Where is the problem?
Facts:
134,217,728 bytes is equivalent to 128MB. These numbers indicate that a limit of some memory has been reached.
2 power of 16 = 65536
2 power of 27 = 134217728
There some sites that suggest to increase the memory limit of PHP with memory_limit directive in php.ini file. But this will only prolong the problem to another day. How are you going to keep increasing the memory limit?
Possible approach:
- Some where along the setup, the application is eating up memory through an infinite loop. Review location of the application file (model) that is causing the error.
- It states "Fatal error" and not "Php Fatal error", indicating Apache web server is sending the error instead of PHP. Check if web server was restarted after the memory_limit was increased in the /etc/php.ini file.
- Database configuration needs to be edited for large selects or join processing. (High performance Innodb)
Troubleshooting (approach 1):
- Use phpinfo() to compare the memory_limit with what was set in php.ini file. Check Loaded Configuration File, did it say which php.ini file was loaded? This file can be placed in many places.
- In PHP, apply the memory_get_usage() to display memory in used.
- For database related calls, use the function mysql_free_result() to release memory used by variables.
- If the memory grows large, it may be possible to remove the object from the memory via the unset() function.
Troubleshooting (approach 3):
- Create a large database and execute various calls via the web browser. Sample large database can be found at Wikipedia.
No comments:
Post a Comment