[Dovecot] Resource temporarily unavailable?
Todd Burroughs
todd at hostopia.com
Tue Aug 9 03:12:16 EEST 2005
On Sun, 7 Aug 2005, Timo Sirainen wrote:
> On Tue, 2005-08-02 at 17:19 -0400, Todd Burroughs wrote:
>>> One thing I'd like to suggest is that this error would be better if it had
>>> more information about what resource wasn't available.
>>
>> The error is EAGAIN caused from the socket() system call.
>
> Are you sure? My Linux's man page or UNIX98 man page doesn't say that
> socket() could ever return EAGAIN. If it's out of file descriptors or
> something else, it should return EMFILE or ENFILE.
>
> connect() however can return EAGAIN:
>
> EAGAIN No more free local ports or insufficient entries in the routing
> cache. For PF_INET see the net.ipv4.ip_local_port_range sysctl
> in ip(7) on how to increase the number of local ports.
>
> It can't be about local ports since UNIX sockets don't use ports.
I think you're right. In the socket() manpage, it says that other errors
could be generated by the underlying protocol modules. I'm not sure why,
but was thinking that it came from this. It looks like UNIX sockets
will not generate this error either.
I think I found this in the kernel in unix_stream_connect(). It looks
like the backlog for waiting sockets gets too high and causes this error.
It can be set with /proc/sys/net/core/somaxconn, which defaults to 128.
I've set this to 1024 and will have to wait to see if it helps.
Todd
More information about the dovecot
mailing list