Re: PHP allocating too much memory
| From: | Johannes Schlüter | Date: | Wed, 15 Jun 2016 13:22:44 +0000 |
| Subject: | Re: PHP allocating too much memory | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-94009@lists.php.net to get a copy of this message | ||
Hi,
On Wed, 2016-06-15 at 09:01 -0400, Peter LeBrun wrote:
> I'm getting the following error in php7.0.5:
>
> Fatal Error: Allowed memory size of 536870912 bytes exhausted (tried to
> allocate 140729445144864 bytes)
The huge number 140729445144864 is most likely consequence of an
overflow.
Can you try to reproduce this with a debug build? - Those make the error
message a bit more verbose by stating which emalloc call caused this.
Probably one can receive more info by attaching gdb (or another
debugger) to the PHP process
i.e.
$ gdb -p 1234 # 1234 is the PID of a PHP process
(gdb) source /path/to/php-src/.gdbinit
(gdb) break zend_mm_safe_error
(gdb) run
now hit PHP a few times
(gdb) bt
[dumps system stack trace]
(gdb) zbacktrace
[dumps PHP-level stack trace, gdb macro defined in gdbinit loaded above]
johannes
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc