-
Notifications
You must be signed in to change notification settings - Fork 4
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
consumer times out often, help to debug? #2
Comments
could it be that you have a poll interval longer than 5 seconds? it seems we have a hard-coded read-timeout of 5 seconds here: https://github.com/jrydberg/gevent-kafka/blob/master/gevent_kafka/broker.py#L30 |
i actually had my poll interval set to 5, i'll try 3 and restart. On Fri, Oct 19, 2012 at 12:12 AM, Johan Rydberg notifications@github.comwrote:
|
didn't help, still seeing timeouts at: and at: and also rarely at: On Fri, Oct 19, 2012 at 12:18 AM, David Birdsong
|
try to increase the hard-coded values to something HUGE (e.g., five minutes) and see if you get any data at all, or if things are just stuck. what version of Kafka btw ? |
On Fri, Oct 19, 2012 at 12:28 AM, Johan Rydberg notifications@github.comwrote:
raised to 5 mins, not stuck at all. cruising pretty fast actually.
BRANCH="0.7.1" this Hash is generally the latest commit in the 0.7.1 release branch.HASH="b045327b8064c00f044937e1105f09ffcdc03432"
|
no read timeouts in the last ~20 mins. so that helped. is there a way to plumb that kwarg through easily when On Fri, Oct 19, 2012 at 12:48 AM, David Birdsong
|
try the new "timeouts" branch. you can now pass connect_timeout and read_timeout to Consumer and Producer. it is not tested at all though (not even executed once :)) |
looks like you forgot to pass the new timeout kwargs through to Traceback (most recent call last): On Fri, Oct 19, 2012 at 2:52 AM, Johan Rydberg notifications@github.comwrote:
|
try again! On Fri, Oct 19, 2012 at 12:09 PM, david birdsong
|
i passed in a 10 second read timeout..definitely looks better. On Fri, Oct 19, 2012 at 3:12 AM, Johan Rydberg notifications@github.comwrote:
|
are you pulling a lot of data? that's quite a long read timeout for it isn't really related to the poll interval, as I said earlier. the that's kinda odd. On Fri, Oct 19, 2012 at 12:47 PM, david birdsong
|
my consumer reports that i'm grabbing ~2500 messages that total about 39MB. i don't see what knob one has to tune on the consumer side to reduce the On Fri, Oct 19, 2012 at 4:09 AM, Johan Rydberg notifications@github.comwrote:
|
i was off by 10x and my calc is hacky. i'm simply adding the length of each msg together per msg batch. for some reason this never matches what the protocol layer reports as what has been delivered over the wire. no matter, i lower the max_size to 1/10 the default and timeouts stop. why would a large fetch cause a timeout? seems that if bytes are passing, a timeout shouldn't happen at all. |
it might stem from that we're doing a socket.read(N) where N is the but it is quite mysterious that you cannot read 1MB (default max_size) in On Fri, Oct 19, 2012 at 9:26 PM, david birdsong notifications@github.comwrote:
|
You definitely don't want to pass a large value to Looking in Int32Protocol, I see strange values for The bandwidth to the Kafka broker is, for intents and purposes, low-latency gigabit and shouldn't matter. (I work with Dave, to answer your next question. I'm just following along.) |
agreed. but i think it doesn't really explain the timeout anyhow. On Sun, Oct 21, 2012 at 5:33 AM, Jed Smith notifications@github.com wrote:
|
Hi, in demo'ing simple consumer code, I see many timeouts that I could use some help to track down. None of our scala producers/consumers see these timeouts to kafka, only the python clients:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/gevent_kafka/consumer.py", line 192, in _reader
self.offsets[bpid], self.max_size)
File "/usr/lib/python2.6/site-packages/gevent_kafka/broker.py", line 50, in fetch
max_size)
File "/usr/lib/python2.6/site-packages/gevent_kafka/broker.py", line 36, in _interaction
value = getattr(conn, method)(_args, *_kw)
File "/usr/lib/python2.6/site-packages/gevent_kafka/protocol.py", line 209, in fetch
error_code, messages, length = _decode_fetch_response(self.read())
File "/usr/lib/python2.6/site-packages/gevent_kafka/protocol.py", line 173, in read
data = self.socket.recv(4)
File "/home/david/lib64/python/gevent-0.13.6-py2.6-linux-x86_64.egg/gevent/socket.py", line 427, in recv
wait_read(sock.fileno(), timeout=self.timeout, event=self._read_event)
File "/home/david/lib64/python/gevent-0.13.6-py2.6-linux-x86_64.egg/gevent/socket.py", line 169, in wait_read
switch_result = get_hub().switch()
File "/home/david/lib64/python/gevent-0.13.6-py2.6-linux-x86_64.egg/gevent/hub.py", line 164, in switch
return greenlet.switch(self)
timeout: timed out
The text was updated successfully, but these errors were encountered: