[zeromq-dev] ZMQ Proxy crash in every 3 days

Ashok Kumar Karasala ashokrj863 at gmail.com
Wed Apr 7 10:17:22 CEST 2021


Hi Francesco,

Thanks for the response.


   1. We run PyZmq proxy in a docker container
   2. Publishers and subscribers are connected via tcp
   3. Our number of topics are dynamic, And our qps is 200 topics per
   second. => We create a sub socket and subscribe to a topic and we close it
   when the work is done.

We see container crashes with code 139 (Which indicates a Segmentation
fault), and when the container is crashed we don't see any anomalies in the
system graphs.

I have tried to simulate the crash but so far no luck and we see this
frequently(between 2-6 days),  we are worried about it.

This basically arised when we moved from static number of topics(one topic
per server) to dynamic subscriptions(one per user).

Thanks & Regards,
Ashok K.


On Tue, Apr 6, 2021 at 2:58 AM Francesco <francesco.montorsi at gmail.com>
wrote:

> Hi Ashok,
>
> Not sure what you mean with "crash" in a Python context, however, if this
> can help somehow, here's my experience with ZMQ proxy: in my company we're
> running it 24/7 for months without issues. There are some differences
> though:
> a) we use libzmq C API from a C/C++ software
> b) the proxy is of type XSUB/XPUB like yours but the transport for
> frontend socket is "inproc"
> c) we use zmq_proxy_steerable()
>
> As I said this is probably not helping much but the message is: I have
> experience with the proxy running in all sort of corner conditions (mute
> state on some socket, all queues full, etc) and never found any issue so far
>
> Francesco
>
> Il giorno lun 5 apr 2021 alle ore 07:08 Ashok Kumar Karasala <
> ashokrj863 at gmail.com> ha scritto:
>
>> Hi Team,
>>
>> We are facing a ZMQ proxy crash every 3 days and when we look at the
>> system graphs we don't see any CPU or memory spikes. From the code, we have
>> gracefully handled the socket's initialization and termination.
>>
>>
>> We couldn't trace back to any system resource being the issue to crash.
>> Is there any way to debug this?
>>
>> At the time of crash :
>>  CPU, Memory and open file's count are under the allocated limits.
>>
>>
>> Proxy code :
>>
>> def main(lang):
>>     global context
>>     context = zmq.Context()
>>     frontend = context.socket(zmq.XPUB)
>>     frontend.bind("tcp://*:%s" % (8888,))
>>
>>     backend = context.socket(zmq.XSUB)
>>     backend.bind("tcp://*:%s" % (9999,))
>>
>>     try:
>>         zmq.proxy(frontend, backend)
>>     except Exception as e:
>>         print(e)
>>
>>     frontend.close()
>>     backend.close()
>>     context.term()
>>
>> Thanks & Regards,
>>
>> Ashok K.
>>
>>
>>
>>
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev at lists.zeromq.org
>> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20210407/ad53c7e7/attachment.htm>


More information about the zeromq-dev mailing list