• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Where can I check why nginx is going dead from time to time ?

peter00

New Pleskian
Hello,

I'm new here :)

My ngix is going dead few times a day. Is there some log file where I can check what us the issue?

My Additional nginx directives server wide:

NGINX:
# you must set worker processes based on your CPU cores, nginx does not benefit from setting more than that
worker_processes auto; #some last versions calculate it automatically
worker_connections 1024;
worker_rlimit_nofile 2048;
add_header Cache-Control public;
add_header Pragma public;

# Fix ngix dead
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;

# Configure timeouts
client_body_timeout   12;
client_header_timeout 12;
#send_timeout          10;

#ssl_session_cache shared:SSL:1m; # holds approx 4000 sessions
#ssl_session_timeout 1h; # 1 hour during which sessions can be re-used.
#ssl_buffer_size 4k;

keepalive_disable msie6;        # disable selected browsers.

# The number of requests a client can make over a single keepalive connection. The default is 100, but a much higher value can be especially useful for testing with a load‑generation tool, which generally sends a large number of requests from a single client.
keepalive_requests 10000;

# How long an idle keepalive connection remains open.
keepalive_timeout 5;

upstream backend {
    # The number of idle keepalive connections to an upstream server that remain open for each worker process
    keepalive 32;
}
 
Hi @peter00,

That's no good.

I hope the below information helps you diagnose the problem.

nginx
  • Logs
    • Global logs:
      • Access log: /var/log/nginx/access.log
      • Error log: /var/log/nginx/error.log
    • Domain logs:
      • Access logs:
        • HTTP log: /var/www/vhosts/system/<domain_name>/logs/proxy_access_log
        • HTTPS log: /var/www/vhosts/system/<domain_name>/proxy_access_ssl_log
      • Error log: /var/www/vhosts/system/<domain_name>/proxy_error_log
(Snippet from  Plesk for Linux services logs and configuration files)
 
Could you please describe in more detail what "going dead" means to you in terms of Nginx? Is the service actually down?
# service nginx status
Or do you see a 502 error message on a website? (Which would mean that Nginx is up and Apache is not responding.)
Please give more details.
 
Back
Top