Memory exhausted error for a few records |
I am encountering this error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 8192 bytes) in /var/www/html/lgudms2/system/database/drivers/mysqli/mysqli_result.php on line 214 Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in /var/www/html/lgudms2/application/views/errors/html/error_php.php on line 1 This happens when I try to load a method that makes around 5 to six mysql queries to load different records for purposes of access control and loading related encrypted data. This error (and others like it) only started about two weeks ago, so I'm thinking (without any basis) if the size of the database (currently about 200+ MB) is a factor. I would account the queries as:
I tried my code for a version of the mysql with less record, with data (of similar tables and relationships) from about a month ago, and I don't encounter the problem I encounter compared with the data I have from recently. I have to refresh the page about 2 or 3 times for the method to go through. As for my database.php file, I have already set save_queries to FALSE. My current solution is to set the memory limit to 256M, but I feel that this is not the proper solution. Would appreciate solution that would identify where the memory size is increased, and how to resolve it. Thank you.
@rbulalakaw ,
How efficient are the queries? Are the queries slow? Have you done an analysis of the queries?
You could also try freeing the database query result before continuing on to the next query.
PHP Code: // CodeIgniter 4 Try that. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |