Re: PHP allocating too much memory

From: Date: Wed, 15 Jun 2016 13:07:37 +0000
Subject: Re: PHP allocating too much memory
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-94007@lists.php.net to get a copy of this message
On 15/06/2016 14:01, Peter LeBrun wrote:
Hi - I'm getting the following error in php7.0.5: Fatal Error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 140729445144864 bytes) If it's relevant, we're using dblib+freetds. I can't reproduce the issue deterministically; the best I can do is to repeatedly curl an endpoint and something like 30% of the requests will fail due to the above error. The weirdest part about this is that PHP is somehow trying to allocate 140TB of memory. Has anyone seen anything like this? Any insights would be appreciated.
I have hit that due to an opcache bug in handling of constant arrays on classes. Something like: class Foo { const BLA = []; } This was fixed in 5.6.15 [1] which came out before PHP7 though, so I'd imagine that isn't the exact problem you are hitting, but it might be related. [1] https://bugs.php.net/bug.php?id=70795 Cheers -- Jordi Boggiano @seldaek - http://seld.be

« previous php.internals (#94007) next »