File AIO and multiple nginx instances

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:

On Wed, May 18, 2011 at 12:09:34AM -0400, arti wrote:

[alert] 12715#0: worker process 12789 exited with fatal code 2 and can
instances, both with aio support?
It’s strange, but io_setup(2) man does not even mention EPERM:
io_setup(2) - Linux manual page


Igor S.

So, is it a problem of CentOS or Nginx?

Posted at Nginx Forum:

On Fri, May 20, 2011 at 02:54:31AM -0400, arti wrote:

So, is it a problem of CentOS or Nginx?

I believe this is a CentOS issue, and man page does not allow even
to understand what is the issue.


Igor S.

Ok, thanks

Posted at Nginx Forum: