By estherswhite on
I have been getting consistent "Out of memory" errors that I need help diagnosing.
My site is hosted on Media Temple (gs)
Drupal version 6.20
PHP Version 5.2.14
Drush version 4.2
PHP Memory Limit 99M -- according to phpinfo()
The errors I have been getting, specifically:
- Fatal error: Out of memory (allocated 72089600) (tried to allocate 30720 bytes) in ~/sites/all/modules/panels/plugins/export_ui/panels_layouts_ui.class.php on line 157
- Fatal error: Out of memory (allocated 71827456) (tried to allocate 262200 bytes) in ~/includes/menu.inc on line 966
- Fatal error: Out of memory (allocated 71565312) (tried to allocate 76 bytes) in ~/modules/update/update.module on line 573
- Fatal error: Out of memory (allocated 72089600) (tried to allocate 71093 bytes) in ~/includes/database.mysql-common.inc on line 41
99M seems like enough memory -- esp since the errors are happening way below 99MB.
Comments
it can be Apache memory
it can be Apache memory limit, RLimitMEM. phpinfo() wouldn't know about it.
Hills Web
Thanks -- Do you know how to
Thanks -- Do you know how to find out what my Apache memory limit is?
I added this line to my .htaccess
RLimitMem 128000000based on recommendation from following thread: http://drupal.org/node/463234#comment-1942458But it didn't prevent me from getting "Out of memory" errors.
The .htaccess directive won't
The .htaccess directive won't have any effect if overriding is not allowed in main Apache config. I guess you'll have to speak to your hoster.
Hills Web
MySQL Process?
I got a reply from my host -- they said:
I logged into phpMyAdmin and the Processes page doesn't give me any information at all.
However, today, I noticed that I am getting a lot more errors and many of them are related to ~/includes/database.mysql.inc
Anyone ever have a similar issue with MySQL? Where should I look next? Many thanks!
1) disable ALL modules that
1) disable ALL modules that are not strictly necessary.
2) run your cron
3)flush your cache in admin/performance
4) dont cry : 1and1 limit is 32 M, as most of hosters, and you've got probably 72M. You're probably too fat...
I bet everything will go fine after. Give it a try.
Artatum
www.ixxi-mobility.com
Your issue is not directly
Your issue is not directly MySQL related. It could be either because of some resource consuming module or feature you are using, or a rogue piece of custom code if you have any. The exact location of the error message with file name and line number is not important here.
artatum gave you a good advice; If I were you, I would also look into changing your hosting provider to something with more resources and more helpful support.
Hills Web
syntax error, unexpected T_VARIABLE
I enabled verbose error logging and have found these errors in my log in addition to the out of memory error:
PHP Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in ~/includes/common.inc(1696) : eval()'d code on line 1, referer: ~/admin/settings/search404
Am I getting the syntax error bc I'm out of memory or are they separate?
Those are errors thrown by
Those are errors thrown by search404 module or some block on the page when you visit its config page. They are likely to be unrelated.
Hills Web
I'm finding that I can
I'm finding that I can actually get this error on almost any page if I re-build the cache or if I am on a page that requires the site to load information that isn't cached -- like ~/admin/content/node-settings/rebuild or ~/admin/settings.
Examples:
PHP Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in ~/includes/common.inc(1696) : eval()'d code on line 1, referer: ~/admin/settings
PHP Fatal error: Out of memory (allocated 72089600) (tried to allocate 80 bytes) in ~/html/includes/menu.inc on line 966, referer: ~/admin/settings
PHP Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in ~/includes/common.inc(1696) : eval()'d code on line 1, referer: ~/admin/settings/performance
PHP Parse error: syntax error, unexpected T_VARIABLE, expecting '(' in ~/includes/common.inc(1696) : eval()'d code on line 1, referer: ~/accommodations
These pages in particular don't have any blocks on them, so I don't think it can be attributed to a block. What other parts of the site could give issues on common.inc (assuming this isn't just a PHP memory problem)?
(Also -- my host insisted that it I needed more memory for my database so I have a trial MySQL GridContainer, doesn't seem to be helping at all.)
Thank you, I'm at a loss as to what to do next!
Interesting. It looks like
Interesting.
It looks like drupal_eval is called on every page of yours with some malformed code, which could give some clues to what's really happening.
Personally I would quickly edit includes/common.inc and put
die($code)on, say, line 1693.
It should cause any of the affected pages to display rogue code and exit;
After checking the code, the edited file can be promptly restored to its additional state.
Hills Web
Try this link here:
Try this link here: http://library.linode.com/troubleshooting/memory-networking#diagnosing_a...
Thanks for all the troubleshooting suggestions
I ended up switching hosts and now my memory problems are fixed. I don't now what the issue at Media Temple is --- but they reported 99MB but I wasn't getting it. (I'm on DreamHost now, and I am running well below 99MB on a VPS.)
Sometimes the host is
Sometimes the host is problem. Sometimes it's our configuration. Sometimes a hired designer/programmer can create rogue code that consumes excessive memory.
Many variables in an issue like this.
I ran into the same issue w/
I ran into the same issue w/ Media Temple...they said to add
in my local php.ini (/Home/etc/). That increased the limit about 3mb more, but it still isn't working.
I'm trying to avoid switching hosts, so I'll post updates as I get them. This sorta sucks though...
+1 for RLimitMem. Added this
+1 for RLimitMem. Added this to my .htaccess to handle a spike in admin activity that I couldn't get done otherwise:
RLimitMem 512000000
I didn't know this option existed.
Clear Cache
I was able to resolve the memory problems by clearing the cache button in the admin>performance page. It seems to be temporary but at least i'm able to proceed with what i need to get done. the errors continue to occur at some pages but this seems to be a stop gap measure until a more permanent solution can be found. I just upgraded my 1&1 hosting package to a newer server with same price which gives 60mb instead of 30mb. So let's see if that fixes things.