wordpress Fatal error: Out of memory

眉间皱痕 提交于 2019-12-02 11:16:22

问题


I have set php memory limit from whm to 256M from WHM > PHP Configuration Editor. Even so, my wordpress website and admin is showing me an error like below.

Fatal error: Out of memory (allocated 36175872) (tried to allocate 30720 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 14272
Fatal error: Out of memory (allocated 35127296) (tried to allocate 1966080 bytes) in /home/XXXX/public_html/wp-includes/class-simplepie.php on line 5427

I also tried to add following line to the top of wp-config.php, but no luck and same error.

define('WP_MEMORY_LIMIT', '128M');

can anyone suggest me or tell me what may be the solution?


回答1:


I finally think I've solved the White Screen of Death from PHP out of memory Fatal Errors.

Full details here: http://www.isthisyourhomework.com/how-to-fix-the-wordpress-white-screen-of-death/

If setting the WordPress and PHP memory limits doesn't work for you, try adding/edditing the following line in either your Apache conf files. I didn't have access to those, so I added the following line to the .htaccess file in my WP server's document root:

RLimitMEM max

Many hosts have set limits on each user on shared-use servers. The above setting will unfetter your server and banish the WSOD.




回答2:


The SimplePie people reckon that this is caused by a bug in PHP. It was fixed in PHP version 5.3. Upgrading might help.

Newer versions of SimplePie use less memory but still suffer from the same PHP bug that causes lots of cached items to cause you to use loads of memory.




回答3:


Did you change the memory limit in php.ini(or through WHM service configuration page)? If so, try rebooting Apache



来源:https://stackoverflow.com/questions/6887794/wordpress-fatal-error-out-of-memory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!