• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

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