Welcome! Log In Create A New Profile

Advanced

bug in access logging with multiple workers on Windows?

October 06, 2009 04:13PM
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?).

[code]
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;
}
}
}
[/code]
Subject Author Posted

bug in access logging with multiple workers on Windows?

rmalayter October 06, 2009 04:13PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 58
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready