Bug #73873 [Opn->Nab]: PHP run-away queries falsely report as memory exhausted
| From: | cmb@php.net | Date: | Fri, 06 Jan 2017 17:27:07 +0000 |
| Subject: | Bug #73873 [Opn->Nab]: PHP run-away queries falsely report as memory exhausted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-206326@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73873&edit=1
ID: 73873
Updated by: cmb@php.net
Reported by: f00dl3a at gmail dot com
Summary: PHP run-away queries falsely report as memory
exhausted
-Status: Open
+Status: Not a bug
Type: Bug
Package: Performance problem
Operating System: Ubuntu 16.10
PHP Version: 7.0.14
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)
That means that already more than 134217728-20480 bytes have
been allocated, so further allocation of 20480 bytes would exceed
the memory limit.
> It should say infinite loop in SQL query or something more
> indicative of the actual problem, [â¦]
No, because infinite loops are considered to be userland bugs in
PHP (for performance reasons), see
<http://php.net/manual/en/functions.user-defined.php>.
Previous Comments:
------------------------------------------------------------------------
[2017-01-05 15:28:38] f00dl3a at gmail dot com
Description:
------------
When you write a run-away or infinite loop in a MySQL PDO query, it falsely reports as a memory
exhausted situation. Even when the memory attempted to be allocated is well, well under the allowed
memory size.
Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes)
Expected result:
----------------
It should say infinite loop in SQL query or something more indicative of the actual problem, not
allowed memory size exhausted when the memory attempted to allocate is not even 5% of the allowed
size!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73873&edit=1