Nginx on Tru64/alpha

Hello.

I recently installed nginx 0.7.37 on Tru64 5.1B-4 using Compaq C
V6.5-303 compiler.

Everything works great if I leave the default of worker_processes set
to 1. However, if I increase it to 2 (since this machine has 2 CPUs),
I immediately start getting a flood of fcntl errors in the error.log.

Running truss on the process shows that both processes attempt to lock
the same nginx.lock.accept file, which is what causes the problem.

Is this a known problem, and is there a workaround?

Thanks!
-Dustin

On Sun, Feb 22, 2009 at 05:49:31PM -0600, Dustin Marquess wrote:

I recently installed nginx 0.7.37 on Tru64 5.1B-4 using Compaq C
V6.5-303 compiler.

Everything works great if I leave the default of worker_processes set
to 1. However, if I increase it to 2 (since this machine has 2 CPUs),
I immediately start getting a flood of fcntl errors in the error.log.

Running truss on the process shows that both processes attempt to lock
the same nginx.lock.accept file, which is what causes the problem.

Could you shou the error messages ?

Is this a known problem, and is there a workaround?

Try

events {
accept_mutex off;

}

On Mon, Feb 23, 2009 at 3:09 AM, Igor S. [email protected] wrote:

the same nginx.lock.accept file, which is what causes the problem.

Could you shou the error messages ?

The log file shows:

2009/02/24 02:17:02 [alert] 438988#0: fcntl(F_SETLK, F_WRLCK) failed
(13: Permission denied)
2009/02/24 02:17:03 [alert] 438988#0: fcntl(F_SETLK, F_WRLCK) failed
(13: Permission denied)
2009/02/24 02:17:03 [alert] 438988#0: fcntl(F_SETLK, F_WRLCK) failed
(13: Permission denied)

Truss shows:

438988: fcntl(7, F_SETLK, 0x000000011FFFBC28) Err#13
Permission denied

going farther back in the truss shows that fd 7 is the mutex:

438988: open(“/usr/local/nginx/logs/nginx.lock.accept”,
O_RDWR|O_CREAT, 0644) = 7
438988: unlink(“/usr/local/nginx/logs/nginx.lock.accept”) = 0

Is this a known problem, and is there a workaround?

Try

events {
accept_mutex off;

}

Awesome, that seems to work!

Thanks!
-Dustin

On Mon, Feb 23, 2009 at 08:22:24PM -0600, Dustin Marquess wrote:

Running truss on the process shows that both processes attempt to lock
2009/02/24 02:17:03 [alert] 438988#0: fcntl(F_SETLK, F_WRLCK) failed
438988: unlink("/usr/local/nginx/logs/nginx.lock.accept") = 0
The attached patch should help.