Bug #81365 [NEW]: Using OPcache with SHM and file causes 'Allowed memory size of ... bytes exhau'
| From: | wedwards at cyberfusion dot nl | Date: | Mon, 16 Aug 2021 15:23:44 +0000 |
| Subject: | Bug #81365 [NEW]: Using OPcache with SHM and file causes 'Allowed memory size of ... bytes exhau' | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-235871@lists.php.net to get a copy of this message | ||
From: wedwards at cyberfusion dot nl
Operating system: Debian 10
PHP version: 7.4.22
Package: opcache
Bug Type: Bug
Bug description:Using OPcache with SHM and file causes 'Allowed memory size of ... bytes
exhau'
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 bug report at https://bugs.php.net/bug.php?id=81365&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=81365&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=81365&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=81365&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=81365&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=81365&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=81365&r=support
Expected behavior: https://bugs.php.net/fix.php?id=81365&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=81365&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=81365&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=81365&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=81365&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=81365&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=81365&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=81365&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=81365&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=81365&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=81365&r=mysqlcfg