[zeromq-dev] REQ socket not releasing socketpair FDs after being torn down

Marcin Olak marcin.olak at gmail.com
Wed Feb 1 17:03:28 CET 2012

Update: I was able to fix the issue by replacing C++ calls with raw C
calls. Code looks almost 1:1 the same but the difference is - it

On Jan 31, 1:20 pm, Marcin Olak <marcin.o... at gmail.com> wrote:
> Hi,
> In my setup I connect bunch of REQ sockets through a queue device to a
> backend service. REQ sockets are torn down on read timeout. If the backend
> service becomes unavailable my app eventually runs out of FDs.
> If I connect REQ sockets directly to the backend service - they're being
> destroyed gracefully.
> Failing queue device version:http://pastebin.com/AM1fDAVM
> Working direct connection version:http://pastebin.com/3p2Tb2uG
> I traced what's exactly hapenning with socket in these two versions and in
> the first version not a single req_t destructor is being called while in
> the working version req_t destructors are called.
> Any ideas how could I make the queue version surviving the backend service
> unavailability period? I was thinking of using additional heartbeat service
> but maybe there's some other, cleaner way. Also connecting backend-service
> to the other queue endpoint is not possible in my scenario.
> regards,
> Marcin Olak
> _______________________________________________
> zeromq-dev mailing list
> zeromq-... at lists.zeromq.orghttp://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list