Bug #74387 [Com]: php-cgi process leaks memory after killing script due to max_execution_time

From: Date: Thu, 06 Apr 2017 17:24:05 +0000
Subject: Bug #74387 [Com]: php-cgi process leaks memory after killing script due to max_execution_time
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-208372@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74387&edit=1 ID: 74387 Comment by: nish dot aravamudan at canonical dot com Reported by: nocheck-php at bsrealm dot net Summary: php-cgi process leaks memory after killing script due to max_execution_time Status: Open Type: Bug Package: CGI/CLI related Operating System: Ubuntu 16.04 PHP Version: PHP 7.0.15-0ubuntu0.16.04.4 Block user comment: N Private report: N New Comment: Note that in https://bugs.launchpad.net/bugs/1677578 (original report), we also tested 7.0.17 and found the issue to still be present there. Previous Comments: ------------------------------------------------------------------------ [2017-04-06 17:14:31] nocheck-php at bsrealm dot net Fixed version. ------------------------------------------------------------------------ [2017-04-06 17:10:58] nocheck-php at bsrealm dot net Description: ------------ Setup is Lighttpd with php configured as fcgi module. Repeated execution of provided script will lead to some serious memory leaks (200-500 MB per process). Image should be huge enough. I used this one: http://home.bsrealm.net/IMG_2466.JPG Test script: --------------- <?php header("Content-Type: text/plain"); ini_set('max_execution_time', 10); $st_tm = time(); $diff = 0; while (1){ $image = new \Imagick(realpath('./IMG_2466.JPG')); $image->thumbnailImage(64, 48, true, false); $image->clear; $image = null; if ((time() - $st_tm) > $diff) { $diff = (time() - $st_tm); echo "Waiting to Die " . date('h:i:s') . "\n"; flush(); } } ?> Expected result: ---------------- All memory should be freed after script is killed. Actual result: -------------- Memory is not freed. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=74387&edit=1

« previous php.bugs (#208372) next »