-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_poll_timeout isn't documented #56
Comments
The reason is that Here is what the libmemcached man pages have to say about the poll timeout,
You should be wary of using it as it's not considered part of the API yet. |
Okay, thanks for the help! I also noticed that using |
I wish the libmemcached people were told about this rather than me, I think a discussion with Brian Aker would be more fruitful if you get ahold of him. |
The best way to communicate with upstream is by using their launchpad: http://launchpad.net/libmemcached |
We recently had an issue where a piece of code on our network (not pylibmc, something in Java) was leaking client connections to memcached. As a result, memcached eventually ran out of open connections (as per the max connections option, -c). This result was expected, however in our code pylibmc's client behavior was not. In particular, once the server has reached the
max connections
, when we try to use one of our clients to connect to the server, theconnect_timeout
behavior does not behave as expected.For example, if the memcached server's max connection limit has already been hit and we do the following:
ret
will eventually be given the valueNone
(without any exception ever being raised), but the call will block the process for a long time (five seconds) before giving up. We thought thatconnect_timeout
controlled this behavior, but after inspecting the behaviors dictionary and playing with available options, we found that in fact_poll_timeout
controls this behavior. So the behavior we want (approximately) would be given by:This still returns
None
(which is okay, though an exception would be preferred), but it at least does it within a reasonable amount of time (50ms).Is there any reason that the
_poll_timeout
parameter isn't documented in pylibmc? If so, should we be wary of using it? Finally, what exactly does theconnect_timeout
parameter control?The text was updated successfully, but these errors were encountered: