Nginx Warn Log

Hi;
I’m Installing (reverse proxy) Nginx on CentOS, running CPanel / WHM. I
get the following error for a continuous domain. This domain name is
parked.

Log
2010/12/24 02:06:36 [warn] 31794#0: *6387 an upstream response is
buffered to a temporary file /usr/local/nginx/proxy_temp/8/00/0000000008
while reading upstream, client: 80.99.162.219, server: domainparked.com,
request: “GET /download/file.exe HTTP/1.1”, upstream:
http://serverip:81/download/file.exe”, host: “domainparked.com”,
referrer: “http://domainparked.com/download.htm

Posted at Nginx Forum:

Hello!

On Sat, Dec 25, 2010 at 03:09:37AM -0500, codetr wrote:

http://serverip:81/download/file.exe”, host: “domainparked.com”,
referrer: “http://domainparked.com/download.htm

nginx logs warning as long as it buffers upstream response to
disk. You may want to tune proxy_buffers to avoid disk buffering,
see docs for details. Or just ignore it if disk buffering is
expected.

Maxim D.

I added the line proxy_buffering off;
for parkeddomain and problem seems solved… recommended for performance
or stability can have a different setting vhost.conf and nginx.conf
thanks.

my vhost.conf

server {
access_log off;

error_log /var/log/nginx/error.log warn;
listen 80;
server_name maindomain.com www.maindomain.com;

# uncomment location below to make nginx serve static files instead of
Apache
# NOTE this will cause issues with bandwidth accounting as files wont be
logged
location ~* \.(gif|jpg|jpeg|png|ico|js|css|exe|zip|rar)$ {
root /home/user/public_html;
}

location / {
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffer_size 4k;
# you can increase proxy_buffers here to suppress "an upstream response
# is buffered to a temporary file" warning
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

proxy_connect_timeout 30s;

proxy_redirect http://www.maindomain.com:81 http://www.maindomain.com;
proxy_redirect http://maindomain.com:81 http://maindomain.com;

proxy_pass http://serverip:81/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
access_log off;

error_log /var/log/nginx/error.log warn;
listen 80;
server_name forum.maindomain.com www.forum.maindomain.com;

# uncomment location below to make nginx serve static files instead of
Apache
# NOTE this will cause issues with bandwidth accounting as files wont be
logged
location ~* \.(gif|jpg|jpeg|ico|png|js|css)$ {
root /home/user/public_html/community;
}

location / {
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffer_size 4k;
# you can increase proxy_buffers here to suppress "an upstream response
# is buffered to a temporary file" warning
proxy_buffers 16 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;

proxy_connect_timeout 30s;

proxy_redirect http://www.forum.maindomain.com:81
http://www.forum.maindomain.com;
proxy_redirect http://forum.maindomain.com:81
http://forum.maindomain.com;

proxy_pass http://serverip:81/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
access_log off;

error_log /var/log/nginx/error.log warn;
listen 80;
server_name domainparked.com www.domainparked.com;

# uncomment location below to make nginx serve static files instead of
Apache
# NOTE this will cause issues with bandwidth accounting as files wont be
logged
#location ~* \.(gif|jpg|jpeg|png|ico|js|css|exe|zip|rar)$ {
#root /home/user/public_html;
#}

location / {
proxy_send_timeout 90;
proxy_read_timeout 90;

proxy_buffering off; #add this line
#proxy_buffer_size 4k;
# you can increase proxy_buffers here to suppress "an upstream response
# is buffered to a temporary file" warning
#proxy_buffers 16 32k;
#proxy_busy_buffers_size 64k;
#proxy_temp_file_write_size 64k;

proxy_connect_timeout 30s;

proxy_redirect http://www.domainparked.com:81
http://www.domainparked.com;
proxy_redirect http://domainparked.com:81 http://domainparked.com;

proxy_pass http://serverip:81/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

Posted at Nginx Forum:

Hello!

On Sat, Dec 25, 2010 at 09:46:14AM -0500, codetr wrote:

I added the line proxy_buffering off;
for parkeddomain and problem seems solved… recommended for performance
or stability can have a different setting vhost.conf and nginx.conf
thanks.

Switching off proxy_buffering just to suppress warning about disk
buffering is bad idea. If you want to disable disk buffering
completely - use

proxy_max_temp_file_size 0;

instead.

Maxim D.