Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8092997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:24:23+00:00 2026-06-05T20:24:23+00:00

I am using MongoDB to store data. In my project I am connecting multiple

  • 0

I am using MongoDB to store data. In my project I am connecting multiple users(100-2000 users) to a server using thread pool and store the responses of those users in the database. But when I do this I am getting this error. Please help me with this. I am not able to get it. I have already wasted 45 hours on this error.

Error:

java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.avaya.onex.hss.requesthandlers.CommandExecutor.executeCommands(CommandExecutor.java:129)
    at com.avaya.onex.hss.requesthandlers.CommandExecutor.run(CommandExecutor.java:59)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
Caused by: com.mongodb.DBPortPool$SemaphoresOut: Out of semaphores to get db connection
    at com.mongodb.DBPortPool.get(DBPortPool.java:176)
    at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:370)
    at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:149)
    at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:138)
    at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:261)
    at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:211)
    at com.mongodb.DBCollection.insert(DBCollection.java:57)
    at com.mongodb.DBCollection.insert(DBCollection.java:102)
    at com.avaya.onex.hss.objects.LoginRequest.storeData(LoginRequest.java:152)
    at com.avaya.onex.hss.requesthandlers.LoginHandler.handleRequest(LoginHandler.java:20)
    ... 8 more
com.mongodb.DBPortPool$SemaphoresOut: Out of semaphores to get db connection
    at com.mongodb.DBPortPool.get(DBPortPool.java:176)
    at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:370)
    at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:212)
    at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:305)
    at com.mongodb.DB.command(DB.java:160)
    at com.mongodb.DB.command(DB.java:183)
    at com.mongodb.DB.command(DB.java:144)
    at com.mongodb.DBCollection.drop(DBCollection.java:777)
    at com.mongodb.DBApiLayer$MyCollection.drop(DBApiLayer.java:206)
    at com.avaya.onex.hss.requesthandlers.CommandExecutor.executeCommands(CommandExecutor.java:118)
    at com.avaya.onex.hss.requesthandlers.CommandExecutor.run(CommandExecutor.java:59)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T20:24:24+00:00Added an answer on June 5, 2026 at 8:24 pm

    Try increasing the number of connections in the connection pool.

    Look here, at the connectionsPerHost.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been using SQL Server to store historical time series data for a couple
I am using Node.js and tried to store the timestamp data in the Mongodb
I'm considering using MongoDb for a backing store for a WPF app that I'm
I'm using MongoDB to store user profiles, and now I want to use GridFS
I'm considering using MongoDB or CouchDB on a project that needs to maintain historical
I'm doing my first project in node/express. I'm looking to implement a data store
I'm using mongodb to store image metadata and S3 urls. I would like to
Say, if I want to store PDFs or ePub files using MongoDB's GridFS, is
I was wondering what the best way of storing friend relationship data using MongoDB
I am considering using MongoDB to store documents that include a list of key/value

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.