Drupal: how to avoid memory exhausted error message in few circumstances

老子叫甜甜 提交于 2019-12-11 16:44:36

问题


I'm using a Drupal website on godaddy hosting with a low php memory limit.

The website runs ok, but I get an exhausted memory error message when I visit a View. Are views much more expensive to generate for a server ? How can I overcome this issue ?

Also, I've noticed I've issues to navigate in the admin pages if I'm the admin user (uid=1): exhausted memory error again.

If I'm just an authenticated user, then I have no issues with that. Is it maybe because I've more permissions and therefore more module are enabled for admin user ?

thanks


回答1:


http://drupal.org/node/31819 - read about how to increase memory. 64MB or more i recommend to you (96MB or more if you process images via imagecache or other). If godaddy doesn't provide it, increase "hosting level" or change it.




回答2:


Increase the php memory limit

sites/default/settings.php

ini_set('memory_limit', '256M');



回答3:


If I'm just an authenticated user, then I have no issues with that. Is it maybe because I've more permissions and therefore more module are enabled for admin user ?

Answer = Yes, the extra modules are using more memory compared to a regular user.

Drupal: how to avoid memory exhausted error message in few circumstances?

Drupal is viable on shared hosting only if you choose a decent host and have a small to moderate user-base. Honestly, GoDaddy shared hosting has a truly horrible reputation. Stackoverflow is a coding site, but the answer to your question is "get a better host." :o)



来源:https://stackoverflow.com/questions/4849575/drupal-how-to-avoid-memory-exhausted-error-message-in-few-circumstances

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