Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

slund's avatar
Level 5

PHP Terminating... exiting, bye-bye!

Hello lovely Laracast community!

I have an issue where my PHP-FPM is terminating once in a while. And have no clue what's causing the issue (so sorry if this isn't the correct place for placing this issue).

I'm using Forge and provisioning a DigitalOcean droplet through it. PHP 8.1 and Ubuntu 20.04.4 LTS

[31-Oct-2022 19:37:02] NOTICE: Terminating ...
[31-Oct-2022 19:37:02] NOTICE: exiting, bye-bye!
[31-Oct-2022 19:37:19] NOTICE: fpm is running, pid 781
[31-Oct-2022 19:37:19] NOTICE: ready to handle connections
[31-Oct-2022 19:37:19] NOTICE: systemd monitor interval set to 10000ms

The logs hints that fpm gets up and running again, but I can conclude that it isn't successfully serving any requests.

It happens once every few months. I cannot relate the crash to anything happening within the application. A restart of the server through Forge fixes it (PHP restart might also be enough).

What I have checked/thought of:

  • Checked the unattended-upgrades log if it could be related to Ubuntu doing automatic upgrades, didn't lead to anything.
  • https://serverfault.com/questions/735197/how-can-i-trace-the-cause-of-php-fpm-terminating hints that PHP processes should be restarted regularly, but old thread though. It also suggests to setup some auto restart of fpm.
  • Should I upgrade Ubuntu?
  • Could set up some auto restart of the server in case of it not responding, but I rather find the root cause.

Hoping for some pointers of where to start

0 likes
4 replies
Sinnbeck's avatar

Any chance that it is part of your deploy script ? Normally it looks something like

echo "" | sudo -S service php8.1-fpm reload
slund's avatar
Level 5

@Sinnbeck recently switched over to deploying through Envoyer (the issue also occurred before the switch). I can't find verification in their documentation, but I assume that's what's happening here:

Linux Detected...
Release Activated (20221024104818)!
PHP-FPM Detected: Reloading

At the Activate New Release step

Sinnbeck's avatar

@slund Yeah that sounds like it. But if it also happened before it is probably something else as well. But if using zero downtime deployment, Envoyer needs to restart fpm

Please or to participate in this conversation.