On Wed, 2017-11-08 at 15:42 +0200, Mykola Ostrovskyy via zeromq-dev wrote: > 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-Pirat > e > [2] https://pastebin.com/iqx3JsTV > > > Regards, > Mykola
Heartbeats are now included in the protocol, check the various ZMQ_HEARTBEAT_* socket options -- Kind regards, Luca Boccassi
signature.asc
Description: This is a digitally signed message part
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
