go to bug id or search bugs for
Since upgrading to PHP 7.0.7, committed memory keeps increasing until I restart FPM, and then it begins all over again.
I found one other person ("canique") reporting something similar after upgrading to 7.0.6: https://www.dotdeb.org/2016/04/29/php-7-0-6-for-jessie/
"Since upgrading to php 7.0.6 I see memory issues. The committed memory in linux is increasing all the time. I’m checking this with “cat /proc/meminfo | grep Committed_AS”
To see this bug, it’s important to not restart php-fpm and to have a high max request count in your php process pool (pm.max_requests). Each time the php child process is quitting, this memory is of course released. But if those child processes get multiple thousands of requests the committed memory is steadily increasing."
PHP 7.0.7 (cli) (built: May 25 2016 17:35:28) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
php70-php-cli.x86_64 7.0.7-1.el6.remi @remi
php70-php-common.x86_64 7.0.7-1.el6.remi @remi
php70-php-fpm.x86_64 7.0.7-1.el6.remi @remi
php70-php-gd.x86_64 7.0.7-1.el6.remi @remi
php70-php-json.x86_64 7.0.7-1.el6.remi @remi
php70-php-mcrypt.x86_64 7.0.7-1.el6.remi @remi
php70-php-mysqlnd.x86_64 7.0.7-1.el6.remi @remi
php70-php-opcache.x86_64 7.0.7-1.el6.remi @remi
php70-php-pdo.x86_64 7.0.7-1.el6.remi @remi
php70-php-pecl-apcu.x86_64 5.1.5-1.el6.remi @remi
php70-php-pecl-apcu-bc.x86_64 1.0.3-1.el6.remi @remi
php70-runtime.x86_64 1.0-5.el6.remi @remi
Add a Patch
Add a Pull Request
I can verify the issue.
7.0.5 is working fine
7.0.6+ is leaking lots of memory
The php script can be empty. (I just added php opening tags <?)
I am using PHP as an embed library. Therefore i cannot restart the process and my application dies quite quickly.
I was able to pinpoint the problem to this commit:
After this commit my virtual memory usage skyrockets :)
I am using this simple piece of code: https://gist.github.com/paresy/b4babb919a86e9764bc4
Visual Studio 2015, Update 2 on Windows 10 x64
I will attach a screenshot of the diag window in a minute
could be dup to #72476, could you please try the snapshot of php-7.0 branch?
it may already be fixed by this commit: https://github.com/php/php-src/commit/bd74e7d0133493ee4290857ac368f5fbdd278084
Indeed. This fixes the issue.
I had to make a change in php.h (Line 259) though. There seems to be an error in the current master.
# if PHP_WIN32
# if defined(PHP_WIN32)
Otherwise MSVC was very unhappy.
Thanks for the fix!
Fixed after upgrading to 7.0.9. Thanks!