Jump to:
| Project: | Drupal core |
| Version: | 5.23 |
| Component: | base system |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Here's the exact error msg:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35 bytes) in /kb_tools/drupal/5.5/includes/common.inc on line 1314
I found this explaining about error: http://lists.drupal.org/archives/support/2006-09/msg00147.html
So I tried several thing to no avail:
1) look in apache error_log for this message. There was nothing there and I see the access go through in the access_log:
[root@fernando kb_tools]# tail apache/current/logs/access_log
10.1.4.128 - - [02/Jan/2008:18:03:16 -0800] "GET /drupal/?q=admin/content/newsletters/settings HTTP/1.1" 200 183
2) up memory in php.ini file and restart apache server
Still get exactly the same error msg.
3) remove any and all unneeded modules (removed 3 modules). You'd think that would give me 35 bytes. Nope same error message.
If anyone has any ideas, I'd appreciate it.
I tried disabling and uninstalling then reinstalling simplenews but same result.
Best Regards, Kevin
Comments
#1
#2
Please read the handbook on this subject. Search for 'white screen of death'. It is not simplenews related and therefore is this _not_ the place to get support.
#3
Hello Sutharsan,
Thanks for your direction. It led me again to pages like this: http://drupal.org/node/158043
I was able to increase the memory size by adding: ini_set('memory_limit', '512M');
to the settings.php file. (Not exactly sure why my changes in the php.ini file weren't increasing the memory)
My issue is why would clicking on the SimpleNews "Settings" link generate something that takes > 256MB. I watched my httpd process grow to +300MB and then when the page finally loaded my firefox went to +750MB and crashed.
I am a novice to this and I realize there is a lot of code in play here (files: include/common.inc and include/form.inc being referenced in different WSOD results based on 128MB and 256MB memory limit settings) but to say that "It is not simplenews related and therefore is this _not_ the place to get support." seems dismissive at best.
SimpleNews relies only on 1 core-optional module Taxonomy. Am I really to assume that something as simple :) as SimpleNews uses > 256MB of memory or that something in the core php code is responsible? I can't believe this is data depend as my demo site has 10 users, 50 nodes, 5 vocabularies with ~ 30 terms (only 1 vocab. with 2 terms for newsletters).
So I put the memory down to 32MB and everything else in my system works fine.
If I increase memory to 90MB I get this WSOD error: Fatal error: Allowed memory size of 94371840 bytes exhausted (tried to allocate 8388608 bytes) in /kb_tools/drupal/5.5/sites/all/modules/simplenews/simplenews.module on line 2193
I really just want to get to the bottom of this but given my lack of knowledge I would be helpful if someone more experienced was willing.
Best Regards, Kevin
#4
I found what I believe to be the problem.
In my .htaccess file I had the following:
php_value max_execution_time 6000000
which was overriding my php.ini file which had:
max_execution_time = 30 ; Maximum execution time of each script, in seconds
Yes, 6 Million seconds is a little excessive (I remember I was doing some debug around some other module that took a very long time to return > 60 seconds, clearly I've more than covered it.).
So with that much time two things are allowed to happen.
1) Code is allowed to execute for a very long time (Code that generates lots of html which brings us to #2) Of course the interesting thing is it generated the code fairly quickly until it hit the 256M limit and threw an error.
2) In simplenews.module (Line: 2191-2194)
Since the following code uses max_execution_time, it generates an "Initial send time" drop down box which contains 120,005 options.
$max_time = array(0, 1, 2, 3, 4);
for ($i = 5; $i < ini_get('max_execution_time'); $i=$i+5) {
$max_time[] = $i;
}
Morals of this story:
1) Don't give a script 6 Million seconds to run
2) Bounds checking
Best Regards, Kevin
#5
Other bugs related to '134217728 bytes exhausted' issue:
Watchdog - #167424: Cron jobs fail, all connected functionality (search, other modules) ceases to work
Content Access - #145523: Unable to rebuild permissions or install/uninstall module
IP to Country - #115027: Out of Memory on Install
Contemplate - #230885: CCK activates triggers Fatal error
Devel - #234581: Fatal memory size error #229386: Memory leak
Subscriptions - #211070: 1.x - Fatal error: Allowed memory size exhausted in subscriptions.module on line 878
Content Management Filter - #324351: Pager not keeping accurate records on filter
FileField Paths - #325973: multiple upload
Node import - #235433: Out of Memory error when running any import #246746: loop error
#6
thanks for the solution to the problem, you saved me hours
#7
this issue was not related to Simplenews, changing project.
And here's a handbook page on the White Screen Of Death (WSOD) and PHP memory errors that might help others: http://drupal.org/node/158043