azmq icon indicating copy to clipboard operation
azmq copied to clipboard

PUSH socket overflows

Open cc32d9 opened this issue 6 years ago • 2 comments

I'm developing this module using AZMQ, and it doesn't go well: https://github.com/EOSChronicleProject/eos-chronicle/blob/81dbe977a264fcf674d95ef941a5479ef30f78bc/chronicle-receiver/exp_zmq_plugin.cpp

the data is written quite intensively with async_send, and it's not limited by high watermark like the synchronous socket would do. If there's no recipient attaching to that socket, the sender keeps sending endlessly. As soon as the recipient connects to the socket, the sender bails out with "Cannot allocate memory" exception.

Why is it not limited by HWM? I would assume it should do it like the traditional ZMQ library does.

cc32d9 avatar Mar 21 '19 14:03 cc32d9

Is there any chance I could get a minimal reproduction case?

rodgert avatar Apr 22 '19 22:04 rodgert

well in the meanwhile I dropped the idea of supporting ZMQ, and now using websockets only.

But the reproduction case should be quite easy to build, just send to ASMQ socket in an endless loop and you will see it.

cc32d9 avatar Apr 22 '19 22:04 cc32d9