New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Help on how to detect PHP down problem
Hello,
I have a VPS with some wordpress sites and some self coded sites (someone else coded it). I am experiencing timeout in NGINX, and I trade that the PHP FPM is taking too slow to respond.
What can I install or enable, so that it will log which part of code is causing issue?
I am also thinking to log slow mysql queries to pinpoint.
Comments
https://stackoverflow.com/questions/22609257/how-do-i-enable-the-mysql-slow-query-log
Does nginx log say fpm didn't provide response in timely manner?
yes, and php fpm log says
WARNING: [pool www] server reached pm.max_children setting (5), consider raising it
Now, I set the following and waiting if will crash again sometime:
slowlog = /var/log/php.slow.log
request_slowlog_timeout = 6
yes, and php fpm log says
Follow this guide for PHP-FPM https://medium.com/@sbuckpesch/apache2-and-php-fpm-performance-optimization-step-by-step-guide-1bfecf161534