What steps will reproduce the problem?
1. Try to connect to a non-existent host using the zbx_memcached.pl script.
This does have a timeout at what looks to be 75 seconds.
1. Alternatively, connect to a real host that has an artificially slow response
time to the "stats" command so that perl is waiting for the read() rather than
connect(). This appears to not have a timeout at all.
What is the expected output? What do you see instead?
I would expect both versions of the tests above to timeout in no more than a couple of seconds by default.
What version of the product are you using?
The zbx_memcached.pl script doesn't seem to have a version number within it. It came with version 0.0.1 of the templates.
More info:
IO::Socket::INET accepts a timeout parameter but it seems to only honour it on connects and not on reads. There are some solutions to timeouts below.
http://www.perlmonks.org/?node_id=732970
http://www.webmasterworld.com/forum13/3140.htm
Normally you would expect memcached to handle all of these functions in
milliseconds but I have been seeing an error where occasionally memcached
wouldn't ever respond to a request and the zbx_memcached.pl script would sit
there forever waiting for the read().
I don't know the cause of or the solution to the underlying memcached problem
yet but the stacking up of the zbx_memcached.pl script ended up bringing the
load average of the box up enough to affect the site.
Original issue reported on code.google.com by dav...@socialgo.com on 15 Aug 2011 at 3:54
Original issue reported on code.google.com by
dav...@socialgo.com
on 15 Aug 2011 at 3:54