askarbin
Профессор
- Регистрация
- 31 Мар 2009
- Сообщения
- 292
- Реакции
- 36
- Автор темы
- #1
Недавно начались странные проблемы с сервером. Стоит nginx как фронтенд апача + zend optimizer + eaccelerator.
Время от времени nginx уходит в даун, я смотрю логи апача -> пусто, а в логах nginx ->
Конфиг nginx:
Я погуглил, но особо ничего не нашел, что посоветуете делать и в какую сторону смотреть?
Время от времени nginx уходит в даун, я смотрю логи апача -> пусто, а в логах nginx ->
2010/08/11 14:52:14 [error] 15625#0: *6044 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET /xxx/xxxxx/ HTTP/1.1", upstream: $
2010/08/11 14:52:42 [error] 15625#0: *6068 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET /xxxx/xxxxxxxx.$
2010/08/11 14:52:48 [error] 15625#0: *5987 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET /xxxxx/xxxx/ HTTP/1.1", upstre$
2010/08/11 14:53:56 [error] 15625#0: *6083 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http$
2010/08/11 14:53:59 [error] 15625#0: *6102 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http$
2010/08/11 14:55:05 [error] 15625#0: *6107 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET / HTTP/1.0", upstream: "http://193.105.$
2010/08/11 14:55:10 [error] 15625#0: *6109 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite2.com, request: "GET /xxx/xxxxxxx$
2010/08/11 14:55:17 [error] 15625#0: *6111 upstream timed out (110: Connection timed out) while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: mysite.com, request: "GET /xxxxxx/xxxxxxx$
Конфиг nginx:
Код:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen xxx.xxx.xxx.xxx:80;
server_name mysite.com www.mysite.com;
rewrite ^(/manager/.*)$ https://$host$1 permanent;
location ~* ^/(webstat/|awstats|webmail/|myadmin/|manimg/) {
proxy_pass http://xxx.xxx.xxx.xxx:8080;
proxy_redirect http://mysite.com:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
proxy_pass http://xxx.xxx.xxx.xxx:8080;
proxy_redirect http://mysite.com:8080/ /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar)$ {
root /var/www/admin/data/www/mysite.com;
access_log /var/www/httpd-logs/mysite.com.access.log;
error_page 404 = @fallback;
}
location @fallback {
proxy_pass http://xxx.xxx.xxx.xxx:8080;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
}
server {
...
}
server {
...
}
}
Я погуглил, но особо ничего не нашел, что посоветуете делать и в какую сторону смотреть?