[zeromq-dev] Python / Zmq / Gevent

Antonio Teixeira eagle.antonio at gmail.com
Thu Apr 19 17:42:17 CEST 2012

Hello Once Again :)

I have deployed the following scenario :

REQ (ipc://IPC/SOCKET- Connect - Using Multiple Threads/ Greenlets) -> (IPC
ROUTER - Bind ipc://IPC/SOCKET) -> (DEALER TCP - Connect:
-> (Router TCP Bind : - (IPC DEALER - Bind
ipc://IPC/SOCKET2) -> REP ( Using Multiple Threads/ Greenlets Connect -

A Thread make the place of the device with a simple:

data = recv()

All code based on this :

On The REP Side 10 Greenlets
On The REQ Side 1 Greenlet

100 Tasks ( A simple print and return)

Everything Works Well.

The same as above

On The REP Side 10 Greenlets
On The REQ Side 5 Greenlet

It works well until ...
Did Not Receive A Response The Destination Server Is Unreachable.
Ok so Pieter and other at the mailing list pointed me that if the socket
disconnects we clear the socket.

self.workerSocket.setsockopt(zmq.LINGER, 0)

And make a new one , well this still doesn't work.
The REP Side is still online and available since i can use another machine
with the "client software ( the REP Part) " and it works perfectly until
the same happens.

So to "The Guide" we go.
Set Linger 0 to ensure everything is dropped , checked OK
Close the socket and started a new one , checked OK
Use identity in case stuff gets funky , so one UUID for each worker inside
the client set before we connect to the IPC , checked OK

So after all this the problem remains but when I'm terminating the
client(SIGKILL) i can see that "some pending messages" get dumped and sent
to the Server ( REQ Part) maybe something jams the device or i have a
misconfig ?

Versions :

Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)




One More Thanks For The Help :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120419/68c3bc97/attachment.htm>

More information about the zeromq-dev mailing list