[zeromq-dev] accept() and EMFILE/ENFILE
Dhammika Pathirana
dhammika at gmail.com
Fri May 22 10:15:12 CEST 2009
On Fri, May 22, 2009 at 12:17 AM, Martin Sustrik<sustrik at fastmq.com> wrote:
> Dhammika Pathirana wrote:
>>
>> Hi Martin,
>>
>> We can purge idle clients to accept pending connections.
>> Limiting listen backlog is another option, TCP sends ECONNRESET if
>> there's no space in backlog queue.
>
> Right. That would solve the problem.
>
> Still, why do you believe the timout approach is better then simply closing
> and reopening the listening socket on ENFILE/EMFILE to terminate the
> connections in the backlog?
>
> Martin
>
IMHO, it sounds like a bad design.
Aren't we making assumptions about access to well known ports, root
privileges etc. This rules out user space apps.
Also closing the listening socket sends ECONNREFUESED to new
connection requests, this is a hard tcp error.
How does the client know if the server is temporarily busy or not
running at all? Client can query zmq_server, but then aren't we going
to endup with one of those byzantine problems?
Dhammika
More information about the zeromq-dev
mailing list