Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

block request when reach the maxConnections #47

Open
noca opened this issue May 26, 2012 · 3 comments
Open

block request when reach the maxConnections #47

noca opened this issue May 26, 2012 · 3 comments

Comments

@noca
Copy link

noca commented May 26, 2012

Hello, asyncmongo does a very brilliant work!

Now I'm encountered a problem that troubles me. I'm using mongos as a cluster proxy, and when the rqs is up to 2000r/s, the mongos occupied all system memory and when the rqs get higher, the request get "connection reset pee'.

And I looked at the source code of connection pool asyncmongo used, and I got that when the request reached out the maxConnections, the request will failed by the driver. But if I enlarge the maxConnections, the mongos will report error like before for that mongos manipulate each request by a thread.

Why not implement the connection pool to block the request when reach the maxConnections like Spring database connection pool implemented in JAVA instead of return an error ?

@FlorianLudwig
Copy link

I think this is the same issue as #42, #45 and #46. The later two include a pull request to solve this. Please test if one of those solve your problem.

@noca
Copy link
Author

noca commented May 27, 2012

That is what exactly I want! Thanks a lot, FlorianLudwig~~ And by the way, will this patch get into the trunk of the souce code?

@FlorianLudwig
Copy link

You are welcome, glad I could help. I don't know if this gets merged into master, I am not the maintainer of asyncmongo.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants