[zeromq-dev] High CPU load on polling timeout

Mykola Ostrovskyy spambox03 at mail.ru
Wed Nov 8 14:42:17 CET 2017


Hello,

I'm trying to implement heart beat monitoring inspired by [1] and run into
the following problem. As long as heart beat provider replies to the
requests everything runs smoothly. But when it goes dark I see steadily
increasing CPU load on the heart beat monitor side. In 20 seconds or so the
monitor consumes all CPU it can squeeze out of the system. After few
minutes it eventually crashes with "Too many open files" error.

I did a minimal example with sending a request to a dead REP socket and
polling for the reply. When the polling times out I close the socket and
create a new one to try once more. This is essentially what my monitor does
when the provider is offline [2]. And I see exactly the same behavior on
this sample.

Is this expected behavior? Do I do something wrong?


Some information about the platform: ZeroMQ 4.2.2, Linux, ARM64.

[1] http://zguide.zeromq.org/page:all#Heartbeating-for-Paranoid-Pirate
[2] https://pastebin.com/iqx3JsTV


Regards,
Mykola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20171108/84261e7b/attachment.htm>


More information about the zeromq-dev mailing list