Reputation: 1068
I have a problem with PHP-FPM on Debian when trying to reload PHP-FPM configuration with PHP script that runs sudo service php5-fpm reload
which will reload the same php-fpm process on which the script is running. The problem is that I get "502 Bad gateway" on the moment when the php-fpm configuration is reloaded.
In order to reproduce the issue, run a script like following through your browser and run sudo service php5-fpm reload
from your terminal when the script is running:
<?php
sleep(15);
echo 'End';
Is there an easy way to overcome that issue or do I need to find a solution to that problem from a different angle?
Upvotes: 2
Views: 1724
Reputation: 1068
I have no idea why, but changing process_control_timeout = 0
to anything else than 0 (process_control_timeout = 1800s
) solved the issue. Now even after reloading php-fpm I get End
printed out on the screen.
I would be glad if anyone explained why does it actually work.
Upvotes: 2