PHP-MySQLi-Database-Class icon indicating copy to clipboard operation
PHP-MySQLi-Database-Class copied to clipboard

Memory leak

Open paul-stolk-webdiensten opened this issue 5 years ago • 3 comments

When getting records from the database, the PHP memory goes up drastically.

( ! ) Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 2711347632 bytes) in /xxx/MysqliDb.php on line 1621

MySQLi class version 2.9.3.

I have this on: PHP Version 7.4.7 Mysqli version 10.3.8

I dont have this on: PHP Version 7.4.2 mysqlnd 7.4.2

I'm not sure the versions are related.

There are two get()'s on the page; the first goes ok. Right before the second time line 1621 is reached, memory_get_usage() gives 1746944 bytes used. When line 1621 is reached the allowed memory size is exhausted.

paul-stolk-webdiensten avatar Jul 09 '20 20:07 paul-stolk-webdiensten

Did you find a solution?

fiberchains avatar Mar 06 '21 16:03 fiberchains

Did you find a solution?

Sadly: no. In the end I just used standard mysqli queries without any framework/class.

paul-stolk-webdiensten avatar Mar 08 '21 07:03 paul-stolk-webdiensten

Maybe you'll find some clues there: #820

Regards

davvalent avatar May 03 '22 18:05 davvalent