Closed goetas closed 5 years ago
Tried even disabling most of the PHP extensions... currently having:
PHP 7.2.13 (cli) (built: Dec 29 2018 05:15:58) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
[PHP Modules]
calendar
Core
ctype
curl
date
dom
exif
fileinfo
filter
ftp
gd
hash
iconv
intl
json
libxml
mbstring
mysqlnd
openssl
pcntl
pcre
PDO
pdo_sqlite
Phar
posix
readline
Reflection
session
SimpleXML
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib
[Zend Modules]
Tried also with a hello-world 4.2 symfony and same result.
Interesting detail. Running gc_collect_cycles();
increases the memory..
for ($i = 0; $i<100; $i++){
$func();
if(($i%10)===0) {
echo round(memory_get_usage()/1024/1024, 6).PHP_EOL;
gc_collect_cycles();
}
}
Running gc_collect_cycles every 20 iterations makes ram go up 10x faster!
Seems a symfony issue, created ticket here https://github.com/symfony/symfony/issues/32220
Found the issue... https://bugs.php.net/bug.php?id=76982 :sob:
I guess that this in not fault/responsability of this library
First of all, this is a great extension, thank you. Is making my life really easier.
But here my issue... (looks rather similar to https://github.com/BitOne/php-meminfo/issues/54). As you pointed in https://github.com/BitOne/php-meminfo/issues/54 there might be an extension leak... or this extension is not able to detect some memory content.
However, running this:
$func
is a closure that runs a complete symfony 3.4 app.Independently from how many iterations does the for loop, the dumped file looks always the same, but memory usage goes up ~2MB on each loop iteration (reaching my current 500MB memory limit).
Here the dump:
Any idea on what could be?