E
E
Erkebai2015-06-16 21:41:17
PHP
Erkebai, 2015-06-16 21:41:17

Why did php-fpm suddenly crash?

OS Ubuntu 14.04 LTS
nginx 1.8/PHP-fpm 5.5
There are about 20 business card sites on Drupal and a couple of sites on laravel, yii. All this worked perfectly for 6 months. but all of a sudden PHP-FPM started crashing constantly and nginx throws a 502 "Bad gateway" error. I see the following error in PHP-fpm log:

WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

Through htop I see that each children eats 100% cpu - is this normal? If I increase the number of children in the PHP-FPM setting to 100, it gets even worse - all 100 children load the processor by 100% and I get load average 10
Which way to dig?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Softer, 2015-06-16
@Softer

Towards Slow-logs. Something very "stupid" children. And 5 for 20, but even if business cards are not enough, I would divide them into pools of 5 children per pool. At the same time, you will immediately see who is loading from a simple htop.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question