Home > database >  Mongo database connection pool
Mongo database connection pool

Time:10-03

Encounter a directing a connection problem, described as follows:
Connected mongo program run up shortly after, access mongo database abnormal com when reading data. The mongo. MongoSocketReadException: Prematurely reached the end of the stream, other client want to log in mongo can login, view the mongo's number of connections found connection already occupied, to restart the mongo server to improve,
I've tried a lot of kinds of debugging plan:
1. Connect the mongo biggest survival time shortened, under normal circumstances connection was released, when concurrent access is not releasing attachment, occupy all the time, the program has stopped also cannot release, can only be released, restart the mongo server
2. Due to the project using the mongo Java - driver + spring - data - mongo database operation, initially suspected to be a spring - data - directing a pit, then do a use mongo Java - provide apis to manipulate the database driver, manually create and close the connection, but at the time of pressure test for concurrent access to or have been occupied by it is the number of connections,
Use of problems for a long time, hope to have encountered the same problem of the great god to grant instruction, thank you very much,

CodePudding user response:

Mongo is not the default 30000 connection is fill the procedures section is not controlled well

CodePudding user response:

Buy ali cloud mongo service only two hundred connections, and dictionary is good control

CodePudding user response:

Then the problem?
  • Related