[zeromq-dev] Server Crashing due to ZMQ request

Martin Sustrik sustrik at 250bpm.com
Mon Nov 7 07:39:39 CET 2011

On 11/07/2011 02:08 AM, lanre lawal wrote:

> I have a very light weight application that uses the ZMQ library to
> receive messages from an address. What happens is every 10seconds, a new
> request is made to the server to process and receive messages. Now after
> this runs for some 20-30minutes the system where ZMQ connects to crashes
> and its thought that ZMQ is the cause of the crash. Here's my code below:
> byte[] zmq_buffer = new byte[1024];
> gpspos pos = new gpspos();
> gps_parser gp = new gps_parser();
> ZMQ.Context context = new ZMQ.Context(1);
> ZMQ.Socket socket = context.Socket(ZMQ.SocketType.DEALER);
> socket.Connect("tcp://remote_address");
> zmq_buffer = socket.Recv();

What error are you getting? The only problem with the above I can think 
of is memory overflow. You can limit number of messages in the queue by 
using ZMQ_HWM option.


More information about the zeromq-dev mailing list