PHP-FPM: Some pools are slow after reloading from tally

Erulezz

Verified User
Joined
Sep 14, 2015
Messages
949
Location
🇳🇱
For the past few weeks on one system I have been noticing that some FPM pools are slow and webpages feel not very fast to load. I have been watching and testing this for the last couple of days and always a "php-fpm reload" is the solution to speed things up. I have changed the DA tally cron to run every 4 hours like described in the documentation and after that nginx & fpm is reloaded:

Code:
2018:09:14-16:12:01: nginx reloaded
2018:09:14-16:12:01: php-fpm72 reloaded

After this happens most pools are slow and the average reaction time is somewhere between 125-175ms. At first I thought maybe the database but also just php pages without any database connection have this reaction time. If I do a "php reload" the average response time is suddenly a lot faster: average between 30-60ms.

This continues to be this fast until the next Tally completion and the nginx & php reload. After that it is slow again and certainly noticeable when quickly browsing pages. If I manually do a php-fpm reload a few minutes later things are fast again.

I haven't been able to find exactly why this is happening. Nothing in the errors logs. Load is low and not an issue. Is it because they are reloaded at exactly the same time and something goes wrong there with the connection between nginx & fpm workers? Can it help if fpm is reloaded a minute later? I also had a issue last month where the reload got "stuck" and fpm wasn't responding:

https://forum.directadmin.com/showthread.php?t=56671

Using latest configs, latest nginx and php 7.2.10, 4GB ram.

Any ideas where to look or experiences with this? For now (testing this) I have a cronjob setup 2 minutes after the tally to reload php and the difference is really noticeable.
 
Back
Top