1
1
1serfer2014-05-27 17:35:50
Nginx
1serfer, 2014-05-27 17:35:50

With a small load, the nginx server, centos stably falls down once a day. What could be the reason?

With a small load, the nginx, centos, php-fpm server goes down once a day.
There is an assumption that he has a smoke break or a lunch break ... )
load average: 0.40-0.50
php.fpm and mysql also do not really strain.
There are not many visitors per day.
I update the server and all packages to today and also does not help.
Settings in php-fpm.d:
pm = dynamic
pm.max_children = 9
pm.start_servers = 3
pm.min_spare_servers = 2
pm.max_spare_servers = 5
pm.max_requests = 100000
Who faced such problems?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
Igor, 2014-05-27
@1serfer

I recommend putting munin and atop on the server.
In atop, set the statistics collection interval to 60 seconds.
In a day, according to these data, you will understand which resource is exhausted and which process is to blame.
And most importantly, you will always see statistical trends in the use of server resources.

A
Alexey Lesovsky, 2014-05-27
@lesovsky

1. What is cpu usage while lying down? interested in the full line %Cpu(s): from the output of top.
2. Interested in the state of all nginx processes at the moment of playing, can be obtained with 'ps aux |grep nginx'
3. Looked in nginx/error_log and /var/log/messages for crime?

A
Alexander, 2014-05-27
@SashaSkot

There was a similar problem. To lay down all server entirely or LAMP? I have a problem with allocating memory for Muscle Requests. php-fpm created a bunch of instances and for some reason has a higher priority for the memory manager. Decrease pm.start_servers
= 2
pm.min_spare_servers = 3
pm.max_spare_servers = 3
pm.max_children = 5
see what
happens What engine is in the muscle? If Innodb, then you can try to reduce the buffer size innodb_buffer_pool_size. What is it worth now?

P
Puma Thailand, 2014-05-27
@opium

server settings in studio

1
1serfer, 2014-05-28
@1serfer

After reading the logs, I came across some interesting messages:
WARNING: server reached pm.max_children settings (9) consider raising it
Increased from 9 to 30
I'll see what happens today. Could this be the reason for smoke breaks and just not enough processes?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question