Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8890:697f380acfbb HEAD
If epoll_create() fails with EMFILE, suggest increasing epoll's max_user_instances.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 02 Apr 2009 14:10:16 -0400 |
parents | c5cb1f27caea |
children | fbb2343b85d9 |
files | src/lib/ioloop-epoll.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/ioloop-epoll.c Thu Apr 02 14:00:31 2009 -0400 +++ b/src/lib/ioloop-epoll.c Thu Apr 02 14:10:16 2009 -0400 @@ -35,8 +35,14 @@ i_array_init(&ctx->fd_index, initial_fd_count); ctx->epfd = epoll_create(initial_fd_count); - if (ctx->epfd < 0) - i_fatal("epoll_create(): %m"); + if (ctx->epfd < 0) { + if (errno != EMFILE) + i_fatal("epoll_create(): %m"); + else { + i_fatal("epoll_create(): %m (you may need to increase " + "/proc/sys/fs/epoll/max_user_instances)"); + } + } fd_close_on_exec(ctx->epfd, TRUE); }