Reputation: 1323
I had this error today with my NGINX on Vutr, with php7:
2017/08/22 07:46:09 [error] 19191#19191: *7060 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 111.11.11.111, server: somedomain.com, request: "GET /com$
I did a hard reset of the server and now everything is working fine. But what was it, why it happened and will it happen again?
This is my nginx.conf:
user www-data;
worker_processes auto;
pid /run/nginx.pid;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
#custom added 22.08.2017
proxy_read_timeout 300;
#end custom
client_max_body_size 800m;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# SSL Settings
##
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json
application/javascript text/xml application/xml appli$
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Upvotes: 1
Views: 7657
Reputation: 1323
Finally, i found the issue!
I had too many processes at the same time.
the problem was in php-fpm settings.
so this error I had in php logs:
(so if u have same problem check php logs)
On the web I found this article.
After I add change my www.conf file:
pm.max_children = 40
Then I restart the php-fpm:
systemctl restart php7.0-fpm.service
Upvotes: 3