E3-1240 with 32GB Ram - Unable to set the optimal value for the server

Brian crazibri at gmail.com
Mon Oct 16 20:05:19 UTC 2017


We should see memory and cpu for this server. I suspect a variety of issues. 

Is php-fpm using a Unix socket with Nginx? That would help you remove tcp sockets internally.

This likely needs to be much higher but depends on your hardware, cpu/memory. Maybe 500? 

pm.max_children = 50

The below setting should be commented out as I understand because you’re limiting your php threads to handle 2500 requests then die. 
pm.max_requests = 2500 //modified

This likely needs much higher too:
net.core.somaxconn = 2048

I also wonder what the application is caching and how MySQL is doing. MySQL might need better tuning too. 

Brian 
(Sent via Mobile)

On Oct 16, 2017, at 2:04 PM, agriz <nginx-forum at forum.nginx.org> wrote:

worker_processes  4;
worker_rlimit_nofile 40000;

events {
   worker_connections 4096;
#    accept_mutex on;
#    accept_mutex_delay 500ms;
   multi_accept on;
   use epoll;
}

pm.max_children = 50
pm.start_servers = 4
pm.min_spare_servers = 4
pm.max_spare_servers = 32
pm.max_requests = 2500 //modified
rlimit_files = 131072 //modified
rlimit_core = unlimited //modified

# TCP Stack changes 
net.ipv4.tcp_fin_timeout = 20 
net.ipv4.tcp_tw_reuse = 1
net.core.netdev_max_backlog = 10000 
net.core.somaxconn = 2048
net.ipv4.tcp_max_syn_backlog = 2048 
net.ipv4.ip_local_port_range = 15000 65000 

But still not efficient.
Losing visitors abnormally

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,276892,276900#msg-276900

_______________________________________________
nginx mailing list
nginx at nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


More information about the nginx mailing list