File AIO and multiple nginx instances

Igor Sysoev igor at sysoev.ru
Wed May 18 11:34:01 MSD 2011


On Wed, May 18, 2011 at 12:09:34AM -0400, arti wrote:
> 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?

It's strange, but io_setup(2) man does not even mention EPERM:
http://www.kernel.org/doc/man-pages/online/pages/man2/io_setup.2.html


-- 
Igor Sysoev



More information about the nginx mailing list