summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.php-fpm_restart
diff options
context:
space:
mode:
authorlukehamburg <luke.hamburg@gmail.com>2017-03-07 09:50:32 -0500
committerlukehamburg <luke.hamburg@gmail.com>2017-03-07 09:50:32 -0500
commitad401906a93ff5bf2e6f6fb6d3bf7f95ae56ec1a (patch)
treef9d559198182575cbf0bd6a4ef3d3f4a589ac4a1 /src/etc/rc.php-fpm_restart
parentb268e2f4d9bd0dd19a5e61234c914bdd7703cfa7 (diff)
downloadpfsense-ad401906a93ff5bf2e6f6fb6d3bf7f95ae56ec1a.zip
pfsense-ad401906a93ff5bf2e6f6fb6d3bf7f95ae56ec1a.tar.gz
Test fix for hanging check_reload_status
After killing php-fpm (console opt 16) check_reload_status would sometimes hang, consuming 100% of 1 cpu core. I found a reference https://redmine.pfsense.org/issues/3884#note-4 saying that check_reload_status depends on php-fpm. This patch wraps the restart of php-fpm with a stop/start of check_reload_status. In my limited testing, this has eliminated the hangs, which were pretty easily reproducible before.
Diffstat (limited to 'src/etc/rc.php-fpm_restart')
-rwxr-xr-xsrc/etc/rc.php-fpm_restart7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/etc/rc.php-fpm_restart b/src/etc/rc.php-fpm_restart
index 3af827e..c390c77 100755
--- a/src/etc/rc.php-fpm_restart
+++ b/src/etc/rc.php-fpm_restart
@@ -22,6 +22,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+echo ">>> Killing check_reload_status"
+/bin/pkill -9 check_reload_status
+sleep 2
+
echo ">>> Killing php-fpm"
/bin/pkill -F /var/run/php-fpm.pid
sleep 2
@@ -40,3 +44,6 @@ echo ">>> Restarting php-fpm" | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_
echo ">>> Starting php-fpm"
/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null
+# restart check_reload_status
+echo ">>> Starting check_reload_status"
+/usr/bin/nice -n20 /usr/local/sbin/check_reload_status
OpenPOWER on IntegriCloud