The problem of multithreading accessing mongodb

in java, mongodb is operated by multiple threads.
uses mongoTemplate as an operation.
then, there are more than five hundred threads to operate on the mongodb.
then, it was found that none of the 500-plus threads had to create a new mongodb connection at the beginning.
I just want to ask that an error is reported if the default number of queues of mongodb is500.
I just want to ask, is it necessary that every thread produces a mongodb connection? Can you "save" the number of connections in mongodb?

Mar.13,2021

sets connection pooling, which is actually the usage scenario of connection pooling.
MongoClient has this feature.
configure the maximum number of connections for the connection pool.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4651e-44bb3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4651e-44bb3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?