File AIO and multiple nginx instances

arti nginx-forum at nginx.us
Wed May 18 08:09:34 MSD 2011


Hello.

I need to run two nginx instances on one server (not two workers, but
two master processes with their own number of workers each). The problem
is that when nginx is compiled with aio support I can start only one
instance. When I try to start the second one, only master process starts
and these lines appear in error log:

[emerg] 12789#0: io_setup() failed (1: Operation not permitted)
...
[alert] 12715#0: worker process 12789 exited with fatal code 2 and can
not be respawn
...

This happens even if aio directive isn't used in configuration.

My system is CentOS 5.5 with kernel 2.6.18-194.32.1.el5, I've tried
nginx 1.0.0 and nginx 1.0.2

So, is it expected behavior (I don't know nginx and/or aio internals),
or is it a bug in nginx or aio, and is there a way to start two nginx
instances, both with aio support?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,198945,198945#msg-198945




More information about the nginx mailing list