Bug #78076 [PATCH]: Opcache greatly increases memory usage.

From: Date: Sun, 29 Mar 2020 22:18:49 +0000
Subject: Bug #78076 [PATCH]: Opcache greatly increases memory usage.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-226329@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78076&edit=1 ID: 78076 Patch added by: thedinosaurmail@gmail.com Reported by: tyler dot bannister at remote-learner dot net Summary: Opcache greatly increases memory usage. Status: Verified Type: Bug Package: opcache Operating System: Centos 7.4.1708 PHP Version: 7.2.18 Block user comment: N Private report: N New Comment: The following pull request has been associated: Patch Name: fix bug 78076 On GitHub: https://github.com/php/php-src/pull/5321 Patch: https://github.com/php/php-src/pull/5321.patch Previous Comments: ------------------------------------------------------------------------ [2020-02-18 14:58:20] cmb@php.net I can confirm the reported behavior (PHP 7.3 and 7.4 on Windows 10). ------------------------------------------------------------------------ [2019-05-28 16:06:47] tyler dot bannister at remote-learner dot net I've continued testing the problem, and on the command line I was able to stop the memory explosion in my test script by setting opcache.file_cache_only=0. However, I only enabled that setting in the first place to deal with the problem of running out of memory with the Moodle installer. So the issue isn't exclusive to having file_cache_only enabled, but maybe that setting makes the problem worse? The minimal number of non-default settings to replicate (on my now Centos 7.6.1810 with PHP 7.3.5 system) seems to be: opcache.enable=1 opcache.enable_cli=1 opcache.file_cache="/var/lib/php/cli-opcache" opcache.file_cache_only=1 I was also able to replicate the problem on Ubuntu 18.04.2 with PHP 7.2.17: Opcache enabled with opcache.file_cache_only enabled: Starting Memory:389008 Ending Memory:7860232 Opcache enabled with opcache.file_cache_only disabled: Starting Memory:388432 Ending Memory:388432 Opcache disabled: Starting Memory:389992 Ending Memory:390144 ------------------------------------------------------------------------ [2019-05-28 15:43:12] tyler dot bannister at remote-learner dot net PHP 7.28 actual output: Opcache enabled: Starting Memory:385248 Ending Memory:7856480 Opcache disabled: Starting Memory:386104 Ending Memory:386232 PHP 7.3.5 actual output: Opcache enabled: Starting Memory:389112 Ending Memory:8450224 Opcache disabled: Starting Memory:389904 Ending Memory:390088 ------------------------------------------------------------------------ [2019-05-28 15:13:54] cmb@php.net Thanks! ------------------------------------------------------------------------ [2019-05-28 15:09:32] tyler dot bannister at remote-learner dot net I was able to confirm the problem also exists in PHP 7.2.18. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=78076 -- Edit this bug report at https://bugs.php.net/bug.php?id=78076&edit=1

« previous php.bugs (#226329) next »