jeromq icon indicating copy to clipboard operation
jeromq copied to clipboard

The receive queue of subscriber socket is getting full

Open kaushik-shrestha opened this issue 3 years ago • 0 comments

We have one publisher and two subscriber applications utilizing ZeroMQ's Pub-Sub pattern without implementing any heartbeat mechanism.

One application is running on (10.159.251.23) that publishes messages on port 6666: publisher.publisherSocket = zContext.createSocket(SocketType.PUB); publisher.publisherSocket.bind("tcp://*:6666");

And on the same host (10.159.251.23) another application is running that subscribes to this port 6666: subscriberSocket = zContext.createSocket(SocketType.SUB); subscriberSocket.subscribe("API-PROXY.INITIATOR.RES"); subscriberSocket.connect("10.159.251.23:6666");

Additionally, there's a different host (10.159.251.22) running the same subscriber application that subscribes to this publisher application on host 10.159.251.23:6666

The subscriber application on both hosts has been running since last 7 days. However on running netstat -an we see that the receive queue of the subscriber application running on (10.159.251.23) is full: [kaushx@mslt4wct8080 ~]$ netstat -an | grep 6666 tcp6 0 0 :::6666 :::* LISTEN tcp6 0 0 10.159.251.23:52440 10.159.251.22:6666 ESTABLISHED tcp6 0 2588034 10.159.251.23:6666 10.159.251.23:50172 ESTABLISHED tcp6 4196046 0 10.159.251.23:50172 10.159.251.23:6666 ESTABLISHED tcp6 0 0 10.159.251.23:44368 10.159.251.22:6666 ESTABLISHED tcp6 0 0 10.159.251.23:6666 10.159.251.22:45164 ESTABLISHED tcp6 0 0 10.159.251.23:44148 10.159.251.22:6666 ESTABLISHED tcp6 0 0 10.159.251.23:6666 10.159.251.22:45166 ESTABLISHED

This issue keeps occurring every few weeks which get resolved only on re-starting the subscriber application. Do you have any ideas what might be going wrong? Is there any way to clear the receive queue on reaching some threshold? We're using jeromq-0.5.1

kaushik-shrestha avatar Mar 28 '22 10:03 kaushik-shrestha