-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
producer raises FailedPayloadsError #362
Comments
Thanks for posting the logs. Can you post the server logs as well? |
My kafka server log level is INFO, I can't find any higher level log items with these exceptions in my kafka server logs. |
ok, thanks. it could just be flaky network connectivity. in any event, right now the SimpleProducer requires the user to try / except on exceptions like this and manage retries etc. I'm hopeful that #331 will address some of these issues for async producers in 0.9.4. haven't looked at sync producers closely. also you might take a glance at PR #333 |
I'm also occasionally seeing issues with the SimpleProducer giving errors and failing to send messages (the producer client being called within Django web servers). It's kind of intermittent and hard to reproduce consistently, but often enough to be concerning. I wonder if this is related?
I'm using it with pretty default settings kafka = KafkaClient(KAFKA_HOSTS)
producer = SimpleProducer(kafka)
...
producer.send_messages(..) I'm holding a long-lived client/connection and using it to send Kafka events as needed, could there be an issue with this? Any help would be greatly appreciated! I'm using kafka-python 0.9.3 and Kafka server 0.8.2. |
FailedPayloadsError can mean a simple network connection error, or it can mean that the server threw an exception and closed the socket. Check your server logs and look for anything out of the ordinary. If it is just a network issue, then you should be able to try/except on FailedPayloadsError and retry. Because you can't know whether it is an intermittent network error or an unhandled server failure, you probably should limit the number of retries. Managing all of this yourself is not ideal. I've been trying to improve the internal error handling of the consumers (see KafkaConsumer), but unfortunately the producers are still not great. There are a few open issues for 0.9.4 that I'd like to get cleaned up and hopefully we can stamp this out asap! |
Most time kafka-python works well. But some exceptions throwed by kafka-python sometimes.
My kakfa server version is 0.8.2
The text was updated successfully, but these errors were encountered: