I'm testing PHP 7 x64 on my Windows 7 workstation with a basic Apache benchmark
F:\apache\bin\ab -c 200 -n 2000 localhost:8181/Symfony
PHP 7 is on Apache 2.4 with these settings in httpd.conf (revelant part)
LoadFile "F:/php/php702/php7ts.dll"
LoadModule php7_module "F:/php/php702/php7apache2_4.dll"
<IfModule php7_module>
PHPINIDir "F:/php/php702"
</IfModule>
and these other settings in php.ini (relevant part only)
realpath_cache_size = 2M
realpath_cache_ttl = 3600
memory_limit=512M
[opcache]
zend_extension="F:\php\php7\ext\php_opcache.dll"
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=6000
opcache.use_cwd=1
opcache.validate_timestamps=1
opcache.save_comments=1
opcache.fast_shutdown=1
the benchmark terminates after 500/600 requests with this error (found in php_error.log)
Allowed memory size of 536870912 bytes exhausted (tried to allocate 371435115224 bytes) in F:\Symfony\vendor\doctrine\common\lib\Doctrine\Common\Proxy\Autoloader.php on line 88
The same benchmark runs fine for PHP 5.6.17 x64 with the same settings
Why is PHP 7 trying to allocate 371 gigabytes of memory?
I think this is a bug of the PHP 7 version for Windows, it seems to not release memory.