Skip to content
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

Timeouts in pylibmc 1.2.3 #89

Closed
lcosmin opened this issue Jun 21, 2012 · 3 comments
Closed

Timeouts in pylibmc 1.2.3 #89

lcosmin opened this issue Jun 21, 2012 · 3 comments

Comments

@lcosmin
Copy link

lcosmin commented Jun 21, 2012

I'm using the following code, combined with dropping all packets going to port 21111 ( iptables -A INPUT -p tcp --dport 21111 -j DROP):

import pylibmc

c = pylibmc.Client(["localhost:21111"], binary=True, behaviors={ 
        "no_block" : True, 
        "connect_timeout" : 2, 
        "send_timeout" : 5, 
        "receive_timeout" : 5 })

c.add("foo", "bar")

The connect_timeout parameter doesn't seem to work, because the test program hangs for over one minute and finishes with _pylibmc.MemcachedError: error 26 from memcached_add: Operation now in progress .
Is this a known issue or my test case is somehow wrong? I assume the timeouts are in seconds, since the documentation doesn't mention this.

@lericson
Copy link
Owner

Odd behavior, #56 mentions _poll_timeout, does that help?

@lcosmin
Copy link
Author

lcosmin commented Jun 21, 2012

No, not really... I've tried different combinations of connect_timeout and _poll_timeout , even one without the other, etc. but nothing seems to reduce the timeout to something under 1 minute. binary=False didn't help either.

@dkuebric
Copy link

dkuebric commented Dec 5, 2012

I did some digging on this issue (affecting a project I'm working on) and I'm pretty sure it's a problem in libmemcached. Running against 0.44 (the ubuntu 12.04 default), I had the ignored-connect-timeout problem. However, against a fresh build of libmemcached 1.0-15 it works as intended (or, well, it raises that exception after the expected time).

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

No branches or pull requests

3 participants