Client spams with warnings "Unable to send to wakeup socket" endlessly
See original GitHub issuekafka-python version: 2.0.1 python version: 3.7.7
This issue is a duplicate of #1842, that issue is closed and I cannot reopen it. Thus I opened new one.
When I close a spider, kafka starts to spam with “Unable to send to wakeup socket” warning and does not want to stop. Watch attached spider.log file.
I went to sources and add one line which “fix” this issue. Here is original code.
# Source: kafka/client_async.py
# Class: KafkaClient
def wakeup(self):
with self._wake_lock:
try:
self._wake_w.sendall(b'x')
except socket.timeout:
log.warning('Timeout to send to wakeup socket!')
raise Errors.KafkaTimeoutError()
except socket.error:
log.warning('Unable to send to wakeup socket!')
This is fixed.
def wakeup(self):
with self._wake_lock:
try:
self._wake_w.sendall(b'x')
except socket.timeout:
log.warning('Timeout to send to wakeup socket!')
raise Errors.KafkaTimeoutError()
except socket.error as e:
log.warning('Unable to send to wakeup socket!')
raise e
I do not know what causes the problem and why raising exception stops spam.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:15
- Comments:11
Top Results From Across the Web
Client spams with warnings "Unable to send to ... - Bountysource
This issue is a duplicate of #1842, that issue is closed and I cannot reopen it. Thus I opened new one. When I...
Read more >Bug listing with status RESOLVED with resolution NEEDINFO ...
status:RESOLVED resolution:NEEDINFO severity:major · Bug:49574 - "CPU temperature warnings whilst booting 2004.1 AMD64 Live CD causing shutdown.
Read more >fetchmail - fetch mail from a POP, IMAP, ETRN, or ODMR ...
This is a dangerous option and can cause mail loss when used improperly. It deletes old (seen) messages from the mailserver before retrieving...
Read more >Untitled
typo fix - fixed some rpmlint warnings - Added samples to docs-package ... to close bz#154752 Unable to use --address in client mode...
Read more >Troubleshooting | Comet Documentation
The connection will fail if the Comet Backup client is not running on the same ... One anti-spam measure in email is Forward...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same here–this happens as soon as I try to gracefully shut down a consumer. As it stands, I have to forcefully kill the process to get it to stop.
I found another way to solve this problem without modifying source code of Kafka-python.