Havan
Создатель
- Регистрация
- 9 Июн 2012
- Сообщения
- 27
- Реакции
- 3
- Автор темы
- #1
Добрый день. Стоит Nginx+php+mysql, Windows Server 12. Код ошибки (из лога nginx)
Падает при 40-50 активных соединения. Хотя железо вообще не нагружено. 2% проца, 2гига оперы (из 16).
Конфиг Nginx
Код:
2014/01/05 14:59:42 [error] 5108#5148: *1882 upstream timed out (10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond) while connecting to upstream, client: 46.18.4.19, server: site.com, request: "GET /redirect/traff.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:
Падает при 40-50 активных соединения. Хотя железо вообще не нагружено. 2% проца, 2гига оперы (из 16).
Конфиг Nginx
Код:
#user nobody;
worker_processes 8;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server_tokens off;
client_body_buffer_size 1K;
client_header_buffer_size 1k;
client_max_body_size 10k;
large_client_header_buffers 2 1k;
client_body_timeout 10;
client_header_timeout 10;
keepalive_timeout 5 5;
send_timeout 10;
sendfile on;
server {
listen 80;
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
root c:/server/www/site1.com;
server_name *.site1.com;
server_tokens off;
#access_log logs/access.log;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
root c:/server/www/site2.com;
server_name *.site2.com;
server_tokens off;
#access_log logs/access.log;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
root c:/server/www/site3.com;
server_name *.site3.com;
server_tokens off;
#access_log logs/access.log;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
root c:/server/www/site4.com;
server_name *.site4.com;
server_tokens off;
#access_log logs/access.log;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
if ($request_method !~ ^(GET|HEAD|POST)$ ) {
return 444;
}
root c:/server/www/site5.com;
server_name site5.com;
server_tokens off;
#access_log logs/access.log;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
Последнее редактирование модератором: