dovecot-1.1: If epoll_create() fails with EMFILE, suggest increa...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Thu Apr  2 21:10:27 EEST 2009
    
    
  
details:   http://hg.dovecot.org/dovecot-1.1/rev/f17f4b3d002b
changeset: 8232:f17f4b3d002b
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 02 14:10:16 2009 -0400
description:
If epoll_create() fails with EMFILE, suggest increasing epoll's max_user_instances.
diffstat:
1 file changed, 8 insertions(+), 2 deletions(-)
src/lib/ioloop-epoll.c |   10 ++++++++--
diffs (20 lines):
diff -r 387fc4f06956 -r f17f4b3d002b src/lib/ioloop-epoll.c
--- 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 @@ void io_loop_handler_init(struct ioloop 
 	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);
 }
 
    
    
More information about the dovecot-cvs
mailing list