Hi,
I have a strange issue with Nginx, which is causing it to restart every 1 or 2 hours and send out a watchdog email.
The config seems fine
service nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Messages log contains.
mysqld: 2018-07-02 16:28:58 140201424836352 [Warning] Access denied for user 'wordpress_4'@'localhost' (using password: YES)
nginx error.log
2018/07/01 19:41:05 [error] 8548#0: *291 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 83.43.171.175, server: , request: "HEAD / HTTP/1.0", upstream: "http://217.182.xxx.85:7080/"
2018/07/01 22:56:08 [error] 5472#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 162.227.64.246, server: , request: "GET / HTTP/1.0", upstream: "http://217.182.242.102:7080/"
2018/07/01 22:58:16 [alert] 5472#0: *54 open socket #68 left in connection 13
2018/07/01 22:58:16 [alert] 5472#0: *53 open socket #64 left in connection 31
Nginx directives generally all domains
# gzip compression
gzip on;
gzip_min_length 100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_comp_level 7;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
# Expire rules for static content
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
# access_log logs/static.log; # I don't usually include a static log
}
# Feed
location ~* \.(?:rss|atom)$ {
expires 1h;
add_header Cache-Control "public";
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 5;
open_file_cache_errors off;
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test "${test}C";
}
if ($test = PC) {
rewrite ^.*$ /index.php break;
}
location ~ /.well-known {
allow all;
}
if (!-e $request_filename) {
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test "${test}C";
}
if ($test = PC) {
rewrite ^/(.*)$ /index.php?$1;
}
DNS Is forwarded to Cloudflare at the register and not using Plesk Cloudflare module.
Is there any other logs, or how to look at whats causing this ?
I have a strange issue with Nginx, which is causing it to restart every 1 or 2 hours and send out a watchdog email.
The config seems fine
service nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Messages log contains.
mysqld: 2018-07-02 16:28:58 140201424836352 [Warning] Access denied for user 'wordpress_4'@'localhost' (using password: YES)
nginx error.log
2018/07/01 19:41:05 [error] 8548#0: *291 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 83.43.171.175, server: , request: "HEAD / HTTP/1.0", upstream: "http://217.182.xxx.85:7080/"
2018/07/01 22:56:08 [error] 5472#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 162.227.64.246, server: , request: "GET / HTTP/1.0", upstream: "http://217.182.242.102:7080/"
2018/07/01 22:58:16 [alert] 5472#0: *54 open socket #68 left in connection 13
2018/07/01 22:58:16 [alert] 5472#0: *53 open socket #64 left in connection 31
Nginx directives generally all domains
# gzip compression
gzip on;
gzip_min_length 100;
gzip_buffers 16 8k;
gzip_proxied any;
gzip_comp_level 7;
gzip_types text/plain application/javascript application/x-javascript text/javascript text/xml text/css;
# Expire rules for static content
# cache.appcache, your document html and data
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
# access_log logs/static.log; # I don't usually include a static log
}
# Feed
location ~* \.(?:rss|atom)$ {
expires 1h;
add_header Cache-Control "public";
}
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}
# CSS and Javascript
location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}
open_file_cache max=1000 inactive=20s;
open_file_cache_valid 30s;
open_file_cache_min_uses 5;
open_file_cache_errors off;
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test "${test}C";
}
if ($test = PC) {
rewrite ^.*$ /index.php break;
}
location ~ /.well-known {
allow all;
}
if (!-e $request_filename) {
set $test P;
}
if ($uri !~ ^/(plesk-stat|webstat|webstat-ssl|ftpstat|anon_ftpstat|awstats-icon|internal-nginx-static-location)) {
set $test "${test}C";
}
if ($test = PC) {
rewrite ^/(.*)$ /index.php?$1;
}
DNS Is forwarded to Cloudflare at the register and not using Plesk Cloudflare module.
Is there any other logs, or how to look at whats causing this ?