I am using mongodb database. After running my project the initial connections to the mongodb is aroung 21-25, after 5 to 6 hrs connections reached to 230-240 and my application is unable to connect to mongodb. It throws an error saying Too many threads are already waiting for connection. Max number of threads (maxWaitQueueSize) of 500 has been exceeded.
My application is not able to access any collection from mongodb. To connect to DB we are using two technique one in spring data JPA
and other is MongoClient
I am puzzled up by searching when this is occurring and whats going on. How this many connections are getting created.
Please see the attached image for error.
Thanks in advance.