Saturating memcached takes down node #43

Closed
nsabovic opened this Issue Apr 18, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@nsabovic

When Manager.allocate() goes through the whole connection pool and finds all the connections busy, it just re-schedules on nextTick(). In the case where we actually produce more requests than memcached server can handle, these scheduled allocate() calls pile up (since they are produced faster than they are consumed) and eventually choke down the server.

@crash2burn

This comment has been minimized.

Show comment Hide comment
@crash2burn

crash2burn Sep 18, 2012

What's the recommended way to handle the case where "when theres a free connection in my pool, perform this request" then? Now with this patch it just returns an error, and what, we're supposed to retry in the app? Seems like just moving the problem rather than having some smart queue in the library..

What's the recommended way to handle the case where "when theres a free connection in my pool, perform this request" then? Now with this patch it just returns an error, and what, we're supposed to retry in the app? Seems like just moving the problem rather than having some smart queue in the library..

@3rd-Eden

This comment has been minimized.

Show comment Hide comment
@3rd-Eden

3rd-Eden Sep 19, 2012

Owner

@crash2burn I started refactoring the connection pool, as the issue you raised here was also expressed in #54 see https://github.com/3rd-Eden/node-memcached/tree/jackpot for a version that implements my new connection pool 3rd-Eden/jackpot

Owner

3rd-Eden commented Sep 19, 2012

@crash2burn I started refactoring the connection pool, as the issue you raised here was also expressed in #54 see https://github.com/3rd-Eden/node-memcached/tree/jackpot for a version that implements my new connection pool 3rd-Eden/jackpot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment