Bug #81365 [Opn]: Using OPcache with SHM and file causes 'Allowed memory size of ... bytes exhau'
| From: | nikic@php.net | Date: | Tue, 17 Aug 2021 13:23:17 +0000 |
| Subject: | Bug #81365 [Opn]: Using OPcache with SHM and file causes 'Allowed memory size of ... bytes exhau' | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-235911@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=81365&edit=1
ID: 81365
Updated by: nikic@php.net
Reported by: wedwards at cyberfusion dot nl
Summary: Using OPcache with SHM and file causes 'Allowed
memory size of ... bytes exhau'
Status: Open
Type: Bug
Package: opcache
Operating System: Debian 10
PHP Version: 7.4.22
Block user comment: N
Private report: N
New Comment:
Looks like some kind of memory corruption is occurring in shm+file_cache mode. The memory exhaustion
error is (likely) just the way it manifests.
I won't be able to diagnose this without some way to reproduce the issue though.
Previous Comments:
------------------------------------------------------------------------
[2021-08-16 15:23:44] wedwards at cyberfusion dot nl
Description:
------------
I recently disabled opcache.file_cache_only (default). opcache.file_cache is set, however. This
caused the issue below on 1 out of estimated 100 websites.
When using OPcache with SHM Cache *or* File Cache, OPcache works as expected.
When using OPcache with SHM Cache *and* File Cache, memory is exhausted:
"Allowed memory size of 268435456 bytes exhausted (tried to allocate 70064798980 bytes)"
... followed by PHP-FPM logging the process ended with SIGSEGV.
I 'fixed' this issue by physically removing the OPcache directory tree. This leads me to
believe the issue is with the size of this website's OPcache, which is 87 MiB (the second
largest one is 69 MiB). I expect this issue to reoccur as the OPcache grows.
I found one other report of this behaviour (see last lines): https://github.com/Yoast/wordpress-seo/issues/6334#issuecomment-269647620
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=81365&edit=1