[zeromq-dev] PUB/SUB socket result in server's crash

yy l liyongyan0523 at gmail.com
Fri Jul 22 04:33:31 CEST 2011

Thank you very much!

But I have closed the socket every time after connecting server. So, when
client close socket, is it mean that it actively shutdown connection, and
does server know client's socket closing, and what's server's reaction, will
it release the resource of machine?

So, how do I implement server's active release related resource when client
close zmq's tcp socket. And the original BSD socket have two types of TCP
server socket, one is listen socket, the other is connection socket. TCP
server can close the connection socket for releasing resource. But how do
ZMQ do to achieve this function?
2011/7/21 Pieter Hintjens <ph at imatix.com>

> On Thu, Jul 21, 2011 at 11:23 AM, yy l <liyongyan0523 at gmail.com> wrote:
> > As you said, "test" code is almost commented out. But that is exactly
> what I
> > confused. My server doesn't send any data but only bind the socket.
> However,
> > it's memory still grows continunously.
> Your client keeps connecting, which is incorrect. 0MQ sockets will
> automatically reconnect when their peer comes online. So you create a
> socket ONE time, connect ONE time, and then wait for data to arrive.
> By creating sockets and connecting them over and over, you are doing a
> denial-of-service on the server, and it is normal that the process
> (server, and also client, probably) will run out of socket handles and
> fill up memory.
> -Pieter
>  _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110722/72560ceb/attachment.htm>

More information about the zeromq-dev mailing list