PHP-FPM crashes with ERROR: Another FPM instance seems to already listen

Hello.
I updated PHP to version 8.1, everything works, but after a while it stops with an error:
Bash:
ERROR: Another FPM instance seems to already listen
If I delete the socket files *.sock in
Code:
/var/run/php-fpm/
, and restart php-fpm, then everything continues to work.

But what's happening?
 
ERROR: Another FPM instance seems to already listen on /var/run/php-fpm/<somethink>.sock
ERROR: FPM initialisation failed
 
I understand it. The files remain, I delete them, after that everything continues to work. What's wrong with them?
 
What I assume is probably happening:
  1. Start php-fpm
  2. php-fpm Crashes eventually and leaves the sock file around. It's not connected to anything anymore
  3. php-fpm Gets restarted
  4. php-fpm Sees the older sock file and refuses to start, thinking it's already started
 
Sorry I can't be more helpful. The logs you posted are not of a crash, but of php-fpm trying to start up after the crash.
 
I understand that, I thanked you sincerely.
I don't understand why php-fpm crashes. There is nothing in the logs.
 
There is nothing in the logs.
Nothing in /var/log/messages?

Been a while since I used php fpm but think there are ways to bump up the logging verbosity.

What web server are you using? Crank up the logging on there and see if any patterns to when it stops delivering PHP.

Any idea when the crash happens - any time of day that it might be (I appreciate you are not seeing it happen, but does it seem to be every night) - any pattern? What might be happening at that time (extra load, backup scripts, search engine crawlers).

Run an everyminute script that dumps top display to a log file and see if any memory or swap pressure.

Run a script on another machine that makes a web request every minute to the php-fpm crashing server - then you might be able to determine more of the when it happens - see if there's a pattern.
 
Back
Top