Bug in access logging with multiple workers on Windows?

I think I’ve run into a Windows-specific bug with access logging and
multiple worker processes with file locking.

Whenever I have access logging enabled (at the http or server layers),
and I increase the number of worker processes to more than 1, nginx
0.8.19 will not respond to any requests (although it does accept
connections on port 80).

I have nginx set up as a proxy to a legacy web application, running on
localhost on port 10080. Below is the troublesome configuration
(comments stripped). It works fine if I either disable the access log,
or set number of worker processes to 1. But having both enabled causes
the hang (presumably a file locking issue between the multiple
workers?).

worker_processes 2;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] “$host”
“$request” ’
'$status $body_bytes_sent “$gzip_ratio”
“$http_referer” ’
‘"$http_user_agent" “$http_x_forwarded_for”’;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/css text/javascript application/x-javascript;
gzip_proxied any;
server {
listen 80;
server_name_in_redirect off;
access_log logs/host.access.log main;
location / {
proxy_pass http://127.0.0.1:10080;
proxy_set_header Host $host;
proxy_read_timeout 900;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs