Skip to content

Producer thread crashes if client hits fd limit #724

Closed
@dpkp

Description

@dpkp

We should handle this a bit more gracefully.

Uncaught error in kafka producer I/O thread
Traceback (most recent call last):
  File "venv/lib/python3.5/site-packages/kafka/producer/sender.py", line 55, in run
    self.run_once()
  File "venv/lib/python3.5/site-packages/kafka/producer/sender.py", line 145, in run_once
    self._client.poll(poll_timeout_ms, sleep=True)
  File "venv/lib/python3.5/site-packages/kafka/client_async.py", line 407, in poll
    metadata_timeout_ms = self._maybe_refresh_metadata()
  File "venv/lib/python3.5/site-packages/kafka/client_async.py", line 631, in _maybe_refresh
_metadata
    self._maybe_connect(node_id)
  File "venv/lib/python3.5/site-packages/kafka/client_async.py", line 247, in _maybe_connect
    conn.connect()
  File "venv/lib/python3.5/site-packages/kafka/conn.py", line 140, in connect
    self._sock = socket.socket(self.afi, socket.SOCK_STREAM)
  File "/usr/local/lib/python3.5/socket.py", line 134, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 24] Too many open files

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions