Skip to content

getting "This socket is already used by another greenlet" #709

Closed
@vershininm

Description

@vershininm

Hi,
I know you are not testing kafka-python with gevent, anyway it seems work quite good with gevent.
We currently experiencing only one issue with it. From time to time we getting following exception:

  File "brain/series/writer.py", line 555, in submit
    kafka_async_producer.send('seriesupdates', su)
  File "kafka/producer/kafka.py", line 414, in send
    self._sender.wakeup()
  File "kafka/producer/sender.py", line 293, in wakeup
    self._client.wakeup()
  File "kafka/client_async.py", line 686, in wakeup
    if self._wake_w.send(b'x') != 1:
  File "gevent/_socket2.py", line 325, in send
    self._wait(self._write_event)
  File "gevent/_socket2.py", line 173, in _wait
    raise _socketcommon.ConcurrentObjectUseError('This socket is already used by another greenlet: %r' % (watcher.callback, ))

Could you please look into this? Probably some thread lock could solve it?

Thanks!

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