44 messages in ru.sysoev.nginxWeird timeouts, not sure if I've set ...
FromSent OnAttachments
mikeApr 30, 2008 9:36 pm 
Igor SysoevApr 30, 2008 9:54 pm 
mikeApr 30, 2008 10:07 pm 
Igor SysoevApr 30, 2008 10:12 pm 
mikeApr 30, 2008 10:25 pm 
Igor SysoevApr 30, 2008 10:29 pm 
mikeApr 30, 2008 10:37 pm 
Igor SysoevApr 30, 2008 10:40 pm 
mikeApr 30, 2008 10:53 pm 
Igor SysoevApr 30, 2008 11:01 pm 
mikeApr 30, 2008 11:26 pm 
Igor SysoevApr 30, 2008 11:43 pm 
mikeApr 30, 2008 11:55 pm 
Igor SysoevMay 1, 2008 12:02 am 
mikeMay 2, 2008 12:40 am 
mikeMay 2, 2008 1:26 am 
mikeMay 2, 2008 1:27 am 
Dave CheneyMay 2, 2008 5:46 am 
mikeMay 2, 2008 10:21 am 
Igor SysoevMay 2, 2008 10:35 am 
Igor SysoevMay 2, 2008 10:37 am 
mikeMay 2, 2008 11:22 am 
Cliff WellsMay 2, 2008 12:39 pm 
mikeMay 2, 2008 12:45 pm 
Cliff WellsMay 2, 2008 1:04 pm 
mikeMay 2, 2008 1:33 pm 
Denis S. FilimonovMay 2, 2008 1:43 pm 
mikeMay 2, 2008 1:52 pm 
Denis S. FilimonovMay 2, 2008 2:16 pm 
Cliff WellsMay 2, 2008 4:56 pm 
Rob MuellerMay 2, 2008 6:13 pm 
Denis S. FilimonovMay 2, 2008 7:35 pm 
mikeMay 2, 2008 8:16 pm 
Dave CheneyMay 2, 2008 9:54 pm 
Igor SysoevMay 2, 2008 10:51 pm 
Igor SysoevMay 2, 2008 11:04 pm 
Igor SysoevMay 2, 2008 11:24 pm 
mikeMay 2, 2008 11:35 pm 
Igor SysoevMay 2, 2008 11:39 pm 
Denis S. FilimonovMay 3, 2008 12:13 am 
Denis S. FilimonovMay 3, 2008 12:14 am 
Igor SysoevMay 3, 2008 2:04 am 
Andrew DeasonMay 3, 2008 3:41 pm 
mikeMay 3, 2008 4:19 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Weird timeouts, not sure if I've set the right threshholdsActions...
From:mike (mike@public.gmane.org)
Date:Apr 30, 2008 9:36:46 pm
List:ru.sysoev.nginx

It is proxying (basically just load balancing) to 3 upstream nginx webservers which do FastCGI/PHP/normal static files.

I get a lot of "upstream timed out" errors and I can't determine why exactly. Perhaps my buffers are too high, too low, timeouts are too high, too low? I bumped up the timeouts on my proxy machine higher than I normally would set so it wouldn't timeout as often but it still does. All the machines are quad-core xeons with 4GB RAM, SATA2 disks, dedicated to web/fastcgi/php, all connected via a private gigabit VLAN... the files are hosted on NFS, but I'm not seeing any errors related to that in logs either..

nginx PROXY:

user www-data www-data; worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000; working_directory /var/run; error_log /var/log/nginx/error.log error; pid /var/run/nginx.pid;

events { worker_connections 1024; }

http { upstream webservers { server web01:80; server web02:80; server web03:80; } include /etc/nginx/mime.types; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay on; client_max_body_size 100m; client_header_buffer_size 8k; large_client_header_buffers 12 6k; keepalive_timeout 5; gzip on; gzip_static on; gzip_proxied any; gzip_min_length 1100; #gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss gzip_disable "MSIE [1-6]\."; gzip_vary on; server_names_hash_max_size 4096; server_names_hash_bucket_size 128; server { listen 80; access_log off; location / { proxy_pass http://mikehost; proxy_next_upstream error timeout http_500 http_503 invalid_header; proxy_max_temp_file_size 0; proxy_read_timeout 50; proxy_connect_timeout 30; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_ignore_client_abort on; } } }

nginx WEBSERVERS:

user www-data www-data; worker_processes 4; worker_cpu_affinity 0001 0010 0100 1000; working_directory /var/run; error_log /var/log/nginx/error.log debug; pid /var/run/nginx.pid;

events { worker_connections 1024; }

http { include /etc/nginx/mime.types; default_type application/octet-stream;

set_real_ip_from 10.13.5.16; access_log off; sendfile on; tcp_nopush on; tcp_nodelay on; client_max_body_size 100m; client_header_buffer_size 8k; large_client_header_buffers 12 6k; keepalive_timeout 5; server_tokens off; gzip off; gzip_static off; server_names_hash_max_size 4096; server_names_hash_bucket_size 128;

# then an example vhost block server { listen 80; server_name michaelshadle.com www.michaelshadle.com; index index.php; root /home/mike/web/michaelshadle.com/; location ~ .php { include /etc/nginx/fastcgi.conf; fastcgi_pass 127.0.0.1:11000; fastcgi_index index.php; } if (!-e $request_filename) { rewrite ^(.+)$ /wordpress/index.php?q=$1 last; } }

Any thoughts? Would turning off some buffers on the proxy make it better, or would turning off buffering on the webservers make it better? Not quite sure here where the best place would be to change (if anywhere...)

Thanks..