At this point I am completely out of ideas. The site is hosted on a GoDaddy VPS and according to Google Analytics got 450 hits and 1300 page views today. Is that really enough to bring the whole server down?

I have the PHP memory limit set to 128MB so I don't know whats going on.

Just today the site has been down six times due to these errors. Here is an example:

Fatal error: Out of memory (allocated 14942208) (tried to allocate 19456 bytes) in /home/ftb/public_html/sites/all/modules/views/modules/views_node.inc on line 628

I am also getting MySQL "Too many connections" errors as well.

Could it be a PHP 5.2.2 issue?

Any advise you have on debugging this issue would be greatly appreciated!!!! Thanks!

Comments

webdevel’s picture

From earlier today....

[Tue Jan 08 23:46:53 2008] [error] [client 69.108.235.3] PHP Fatal error: Out of memory (allocated 13893632) (tried to allocate 40 bytes) in /home/ftb/public_html/sites/all/modules/views/views_cache.inc on line 73
[Tue Jan 08 23:46:53 2008] [error] [client 98.197.159.16] PHP Fatal error: Out of memory (allocated 13369344) (tried to allocate 19456 bytes) in /home/ftb/public_html/sites/all/modules/views/modules/views_taxonomy.inc on line 222
[Tue Jan 08 23:46:51 2008] [error] [client 64.252.61.127] PHP Fatal error: Out of memory (allocated 13369344) (tried to allocate 3379 bytes) in /home/ftb/public_html/includes/pager.inc on line 120
[Tue Jan 08 23:46:51 2008] [error] [client 68.205.218.14] PHP Fatal error: Out of memory (allocated 7077888) (tried to allocate 77824 bytes) in /home/ftb/public_html/sites/all/modules/feedbuttons/feedbuttons.module on line 146
[Tue Jan 08 23:46:51 2008] [error] [client 76.204.145.24] PHP Fatal error: Out of memory (allocated 8912896) (tried to allocate 4864 bytes) in /home/ftb/public_html/sites/all/modules/user/user.module on line 457
[Tue Jan 08 23:46:51 2008] [error] [client 71.106.126.2] PHP Fatal error: Out of memory (allocated 6291456) (tried to allocate 19456 bytes) in /home/ftb/public_html/sites/all/modules/buddylist/contrib/buddylistinvite/buddylistinvite.module on line 39
[Tue Jan 08 23:46:51 2008] [error] [client 70.128.107.17] PHP Fatal error: Out of memory (allocated 6029312) (tried to allocate 19456 bytes) in /home/ftb/public_html/sites/all/modules/buddylist/buddylist.module on line 966
[Tue Jan 08 23:46:51 2008] [error] [client 66.53.237.123] PHP Fatal error: Out of memory (allocated 5767168) (tried to allocate 19456 bytes) in /home/ftb/public_html/sites/all/modules/blockcache/blockcache.module on line 234
[Tue Jan 08 23:46:50 2008] [error] [client 76.107.117.168] PHP Fatal error: Out of memory (allocated 13107200) (tried to allocate 40961 bytes) in /home/ftb/public_html/themes/engines/phptemplate/phptemplate.engine on line 392
[Tue Jan 08 23:46:50 2008] [error] [client 24.159.248.91] PHP Fatal error: Out of memory (allocated 13107200) (tried to allocate 40961 bytes) in /home/ftb/public_html/themes/engines/phptemplate/phptemplate.engine on line 392
[Tue Jan 08 23:46:50 2008] [error] [client 98.197.159.16] PHP Fatal error: Out of memory (allocated 5767168) (tried to allocate 19456 bytes) in /home/ftb/public_html/sites/all/modules/blockcache/blockcache.module on line 234
[Tue Jan 08 23:46:50 2008] [error] [client 76.17.42.2] PHP Fatal error: Out of memory (allocated 2359296) (tried to allocate 19456 bytes) in /home/ftb/public_html/modules/block/block.module on line 656
[Tue Jan 08 23:46:50 2008] [error] [client 24.1.56.84] PHP Fatal error: Out of memory (allocated 8912896) (tried to allocate 4864 bytes) in /home/ftb/public_html/sites/all/modules/user/user.module on line 457
[Tue Jan 08 23:46:50 2008] [error] [client 66.31.254.149] PHP Fatal error: Out of memory (allocated 13631488) (tried to allocate 4864 bytes) in /home/ftb/public_html/sites/all/modules/views/modules/views_node.inc on line 886
[Tue Jan 08 23:46:49 2008] [error] [client 144.135.65.203] PHP Fatal error: Out of memory (allocated 524288) (tried to allocate 27436 bytes) in /home/ftb/public_html/includes/database.inc on line 158
[Tue Jan 08 23:46:49 2008] [error] [client 75.53.77.9] PHP Fatal error: Out of memory (allocated 12582912) (tried to allocate 4864 bytes) in /home/ftb/public_html/sites/all/modules/voting_actions/voting_actions_ui.inc on line 597
[Tue Jan 08 23:46:49 2008] [error] [client 98.197.159.16] PHP Fatal error: Out of memory (allocated 12320768) (tried to allocate 16 bytes) in /home/ftb/public_html/includes/menu.inc on line 211
[Tue Jan 08 23:46:49 2008] [error] [client 41.208.78.79] PHP Fatal error: Out of memory (allocated 524288) (tried to allocate 27436 bytes) in /home/ftb/public_html/includes/database.inc on line 158
[Tue Jan 08 23:46:48 2008] [error] [client 69.243.172.36] PHP Fatal error: Out of memory (allocated 13107200) (tried to allocate 8291 bytes) in /home/ftb/public_html/modules/search/search.module on line 1145

nadeemagaskar’s picture

This is seems to be a bug.. there might be some connection problem with mysql and the way drupal handle it.One solution is too increase the connection from 100(default) to 250 in mysql or try this http://drupal.org/node/51263#comment-180220.

amccann’s picture

see http://drupal.org/node/215760

I upgraded from php 4 to 5 and I'm having the same issue (though increasing from 32MB seems to resolve most of the issues).

Even with the higher memory, I'm getting a syntax error in common.inc

amccann’s picture

see http://drupal.org/node/215760

I upgraded from php 4 to 5 and I'm having the same issue (though increasing from 32MB seems to resolve most of the issues).

Even with the higher memory, I'm getting a syntax error in common.inc

wotstheguts’s picture

I moved my website from my test server (512 MB) to a VPS (200 MB) and now these errors come up all the time. Strangely, when I reduced the memory_limit to 64 MB from the default of 128 MB, it improved it a lot! Anyone know what's going on? I could buy more VPS RAM but don't see why it's necessary, it's only a small simple website at this stage.

Could it be a problem specific to VPS memory allocation? My ISP is running Virtuozzo.

As If’s picture

The culprit could be the sheer size of the View query itself. Is it a very complex view? Does it hit the db a lot? Try installing the Devel module and look at the query that way. I recently had to scale down a view for the same reason - removed some of the fields and filters - it was asking WAY too much of the db. By simplifying the view I was able to get the memory load (and page load time) down to about 10% of what it was previously.

Without Devel, I don't think I would have found it.

-------------------------------------------
Interactive Worlds and Immersive Obsessions
http://www.asifproductions.com

bartclarkson’s picture

I ran into this, myself, in development. I can echo As If here.

If you create an aggressive Vew, run it only when needed, not as a universal Block. If you must run it universally, be sure site settings have cache mode turned on.

In development phase, I keep the cache mode off, which combined with the aggressive, universal View cost about 90% performance and ultimately crushed the MySQL with unclosed connections and killed the site.