Score:0

PHP-FPM8.0 Fatal Error Insufficient shared memory!

tr flag

I am running LAMP in VBox6.1 with Ubnutu Server 20.04.

Cause
This morning I removed all attachments to my vdi (optical disk & shared folders) and then used vboxmanage to --compact my vdi as recommended. (Compacting may be the cause of the problem or a bad php update.)

Problem
In any case, after reattaching my shared folders and rebooting my vdi, I was greeted by

● php8.0-fpm.service loaded failed failed The PHP 8.0 FastCGI Process Manager
...
Starting The PHP 8.0 FastCGI Process Manager...
php-fpm8.0[5192]: [15-Jan-2023 07:41:57] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /usr/lib/php/20200930/apcu.so (/usr/lib/php/20200930/apcu.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/apcu.so.so (/usr/lib/php/20200930/apcu.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
php-fpm8.0[5192]: [15-Jan-2023 07:41:57] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'redis.so' (tried: /usr/lib/php/20200930/redis.so (/usr/lib/php/20200930/redis.so: cannot open shared object file: No such file or directory), /usr/lib/php/20200930/redis.so.so (/usr/lib/php/20200930/redis.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
php-fpm8.0[5192]: Sun Jan 15 07:41:57 2023 (5192): Fatal Error Insufficient shared memory!
php8.0-fpm.service: Main process exited, code=exited, status=254/n/a
php8.0-fpm.service: Failed with result 'exit-code'.
ystemd[1]: Failed to start The PHP 8.0 FastCGI Process Manager.
....

Troubleshooting
I figured a bad php update knocked out apcu and redis so I ran: apt install --reinstall php8.0-apcu && apt install --reinstall php8.0-redis and this solved two parts of my problem.

However, I am currently stuck with this error:

● php8.0-fpm.service loaded failed failed The PHP 8.0 FastCGI Process Manager
...
Starting The PHP 8.0 FastCGI Process Manager...
php-fpm8.0[4226]: Sun Jan 15 08:39:51 2023 (4226): Fatal Error Insufficient shared memory!
php8.0-fpm.service: Main process exited, code=exited, status=254/n/a
php8.0-fpm.service: Failed with result 'exit-code'.
Failed to start The PHP 8.0 FastCGI Process Manager.
...

Useful Info

  • All other versions of php-fpm are working correctly
  • Attempting to reinstall php8.0-fpm results i the same problem
  • The are zero limits on my shared memory:
  • # sysctl -a | grep kernel.shm
    kernel.shm_next_id = -1
    kernel.shm_rmid_forced = 0
    kernel.shmall = 18446744073692774399
    kernel.shmmax = 18446744073692774399
    kernel.shmmni = 4096
  • I booted from LiveCD and ran e2fsck -cfyv /dev/mapper/vgubuntu-vg (no errors)
  • The php8.0 php.ini confirms that shared memory is configured properly:
root@test:~# php8.0 -i | grep -i sysvshm
/etc/php/8.0/cli/conf.d/20-sysvshm.ini,
sysvshm
sysvshm support => enabled
root@test:~# php8.0 -i | grep -i sysvsem
/etc/php/8.0/cli/conf.d/20-sysvsem.ini,
sysvsem
sysvsem support => enabled
root@test:~# php8.0 -i | grep -i sysvmsg
/etc/php/8.0/cli/conf.d/20-sysvmsg.ini,
sysvmsg
sysvmsg support => enabled
root@test:~# php8.0 -i | grep -i shmop
/etc/php/8.0/cli/conf.d/20-shmop.ini,
shmop
shmop support => enabled

I also considered that maybe another application was consuming allof the shared memory and causing php8.0-fpm to fail... not the case:

# ipcs -m --human

------ Shared Memory Segments --------
key        shmid      owner      perms      size       nattch     status      
0x64000630 4          root       600          1.1M     4                     

So at this point, I am stumped.

Question:
How do I get php8.0-fpm-running again?

nightwatch avatar
tr flag
Solution: apt remove --purge php8.0* && apt install php8.0
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.