0

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.

chrki
  • 6,143
  • 6
  • 35
  • 55
ar099968
  • 6,963
  • 12
  • 64
  • 127
  • Possible duplicate of [Fatal Error: Allowed Memory Size of 134217728 Bytes Exhausted (CodeIgniter + XML-RPC)](http://stackoverflow.com/questions/561066/fatal-error-allowed-memory-size-of-134217728-bytes-exhausted-codeigniter-xml) – Mr. Engineer Feb 03 '16 at 10:26
  • @Mr.Engineer My question is different... think this is a bug of php 7 version for windows, it seem not release memory. – ar099968 Feb 03 '16 at 10:27
  • Perhaps this belongs over at [sf]? – Mike Rockétt Feb 15 '16 at 16:33

0 Answers0