Hi, I do not know if this is the very right place but,please, excuse me if it is not. I am trying to install views but after selecting it in the build/modules page it gives me the "memory exhausted" message. I have a bunch of modules enabled but I only have this problem when I try to update views.

My memory limit is set to 32M (and as is a shared hosting I can not control that value).

I also searched in google and the drupal forums and tried to do the suggested things with no luck. When I enable views, the only thing I can do is disable it via phpMyAdmin.

Is there any known incompatibility with the i18n module or any other specific module?

I also tried deactivating other modules (with views still active) to see if the problem was due to another module but only stops giving the error when I uninstall views.

These are the errors I get (no so much information I guess)

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 775729 bytes) in /home/jo4ffdqp/public_html/includes/database.mysqli.inc on line 303

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/jo4ffdqp/public_html/includes/theme.inc on line 716

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 30 bytes) in /home/jo4ffdqp/public_html/includes/theme.inc on line 716

thank you very much for the help.

Comments

neclimdul’s picture

what contrib modules do you have installed?

davebv’s picture

CCK (with content and text enabled)
flickr
img_filter
lightbox2
i18n
advanced help
code filter
comment subscribe
contact forms
google analytics
meta tags
pathauto
search 404
service links
token
fivestars
voting API
xmlsitemaps

(maybe too many?)

merlinofchaos’s picture

That doesn't look like too many. Hmm. I don't see devel in the list; right now devel is often party to a number of out of memory errors. Do you have devel.module?

davebv’s picture

Nope, in this server I don't have devel enabled nor even uploaded in the modules folder.

I forgot to mention that my hosting is using mysql 4.1.22 and php 5.2.6 (But I do not know if this can affect the issue).

davebv’s picture

I am sorry, but yes, I had installed devel, I remember but now it's not.

neclimdul’s picture

i was looking for devel as well. The issue still exists after uninstalling devel?

davebv’s picture

Yes, I think I got rid of everything related to devel and the problem still exists.

merlinofchaos’s picture

Hmm. That's odd. Without APC, I run comfortably in 24 megs. I don't see any reason you should be running out of memory at 32 megs. (With APC I top out around 7 megs, but it really helps reduce memory usage by setting aside code).

davebv’s picture

Do you need me to do something maybe to debug or something like that? Is there any setting I should take into account in order to uninstall modules which can interfere with views? Is there any other module which you know it does not work with?

I suspect it can be a problem with i18n, have you tried both modules at the same time? I think I remember views worked well before I installed that module, but I am not so sure if I get views running side by side with i18n.

davebv’s picture

Version: 6.x-2.0-beta3 » 6.x-2.0-beta4

I upgraded to beta4 and this problem still exist. Is there anything I can do to help you?
every time I try to enable views, i cannot access the admin modules and I have to disable the module via phpMyAdmin.
Thanks for your attention.

davebv’s picture

Maybe it is not problem of views but my global setup, so if this is the case, how can I find/troubleshoot the problem? thanks!

merlinofchaos’s picture

Unfortunately, I don't know how you can easily find/troubleshoot the problem. The best thing I can suggest is to use devel.module and turn on the memory checking code so you can see how much memory your site is using without Views. Especially look on the admin/build/modules page, as that page uses extra memory due to menu rebuilding.

davebv’s picture

I have views disabled and the /admin/build/modules. The Devel module says the following results:

Page execution time was 1298.24 ms.
Memory usage:
Memory used at: devel_init()=2.54 MB, devel_shutdown()=23.95 MB.

Is that normal?

Thank you for the suggestions! I really appreciate your help

davebv’s picture

And, by the way, when I try to activate Views, it says:
Memory used at: devel_init()=2.57 MB, devel_shutdown()=32.61 MB.

(My host limits to 32MB)

merlinofchaos’s picture

Wow, 23mb is a lot more than my installation is using without Views. You might experiment by turning on and off various modules that you have and see if any one of them causes a noticeable spike.

davebv’s picture

I tried to disable all the modules and with only some of the core modules I had already 14-16MB.
It is strange because I tried almost the same configuration in a virtual machine and it says it has 11MB-12MB.

Appart from that... I enabled views and it takes 10MB more, if I had 18MB, then it says it uses 28MB.

Odotnet’s picture

Open "php.ini" (or create a new file) and add "memory_limit = 48M"

or

Change "ini_set('memory_limit', '##M');" to "ini_set('memory_limit', '48M');" in sites/default/settings.php

or

Add "php_value memory_limit 48M" to .htaccess :}

davebv’s picture

Isn't the php.ini supposed to be managed by the server admin? Or I can tweak the memory limit in the php.ini file locally?

Can I create php.ini to override the defaults in my root folder of the shared server?

my host is limiting the php memory up to 32MB, so unless they tweak that parameter I cannot do anything.

edit: (I already had the memory limit up to 64 in the setting.php and .htaccess with no success)

Odotnet’s picture

On SOME, not all, shared hosts, you can create your own php.ini file and it will only edit what you tell it too.

Yes it will override yours, but no-one else's settings.

Settings.php & .Htaccess were a big problem with me too - it just wouldn't work. PHP.ini works a treat!

davebv’s picture

Version: 6.x-2.0-beta4 » 6.x-2.0-rc1

I will try, and by the way, where should I put the php.ini? in my home directory?

davebv’s picture

I think I cannot create my own php.ini.
I my folder I have a /etc dir, but the php configuration says this is not a dir in which the php look for .ini files. They are just in /usr/lib/php and /usr/local/lib/php

And in cpanel it says only the administrtor is able to change the maximum limit which is currently 32MB.

So I think there is no way to make it work.
Thanks anyway!!

conley’s picture

I've been having this problem too for a while. I'll be adding the rss feed of the support requests.

merlinofchaos’s picture

Status: Active » Closed (duplicate)

Combining memory related issues into one.

http://drupal.org/node/259479