Hi.
I have set up nginx as load balancer and i seems to get this in the error.log
[quote][error] 7098#0: *85123 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 11.11.11.11, server: myserver.com, request: "GET /json/?callback=json166511 HTTP/1.1", upstream: "http://myip-one:80/json/?callback=jsonp166511", host: "server.sookachat.com", referrer: "http://myserver.com/docs.html"[/quote]
I've tried the solutions in this forum but so far none worked. Can anyone help?
My nginx version: 0.8.52
my nginx.conf and default.conf
[quote]user www-data;
worker_processes 4;
worker_rlimit_nofile 10240;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 8192;
multi_accept on;
use epoll;
}
http {
include /etc/nginx/mime.types;
#access_log /var/log/nginx/access.log;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;
gzip on;
# As per: http://wiki.nginx.org/NginxHttpGzipModule#gzip_disable starting
# with 0.7.63
gzip_disable "msie6";
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}[/quote]
[quote]
upstream backend {
server myip-one:80 max_fails=5 fail_timeout=60s;
server myip-two:80 max_fails=5 fail_timeout=60s;
server myip-three:80 max_fails=5 fail_timeout=60s;
server myip-four:80 max_fails=5 fail_timeout=60s;
}
server {
listen 80;
server_name loadbalancer.myserver.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 10s;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_max_temp_file_size 0;
proxy_pass http://backend;
}
}
[/quote]