Fatal error: Allowed memory size - This might help you

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
jsprague
Registered User
Posts: 21
Joined: Tue Aug 05, 2003 3:07 am
Location: Oregon
Contact:

Fatal error: Allowed memory size - This might help you

Post by jsprague »

I have spent many hours reading through the forums about errors like the one below:

Fatal error: Allowed memory size of 8388608 bytes exhausted

It appears that the causes vary widely, but in most of the threads I have read, nothing helped. I came across something interesting today that you might want to check out..

I was getting these error when clicking on "View Posts Since Last Visit" and sometimes while doing other things. This always occured when our PHPBB_SESSIONS table hit about 30,000 entries. Emptying this table removed the error, but also removed the new post markers so I was unable to see which posts were new - it also logs everybody out of the forums..

Today I tried something as an experiment.. I went to my /var/tmp directory on our server and deleted all of the sessions listed in there. I then tried to go back to the new posts page and got this error:
Could not delete old search id sessions

DEBUG MODE

SQL Error : 1153 Got a packet bigger than 'max_allowed_packet'

DELETE FROM phpbb_search_results WHERE session_id NOT IN ('00006edd9c1212bfb9dd652d161985e5', '00053ce20283aba713c69db38c5cfc13', '00065015f0a2b90014090912fb4295f7', '000a37cebe8f1faee16f74015ba6da12', '000ae11357b551c601120787e32c66c0', '000ca40bb2a07b32a557f4dd4c2f22cf', '000d5681ec222c799dae8cfbddaebdaf'


The sessions list was thousands and thousands long... Then I found this post:

http://www.phpbb.com/phpBB/viewtopic.php?t=346030

Note the response by henningl. I only made the changes to my.cnf file and everything is working much better and I also noticed a speed increase for the loading of pages.

The PHPBB_SESSIONS table is still filling up but it is no longer causing the errors. I would imagine that it will at some point, so the remaining question is - Why isn't PHPBB deleting stale sessions??? At least now I don't have to truncate this table every few hours.

Hope that helps someone, because it doesn't seem that anybody has properly answered the many incedences posted in the forums. The standard answer is to increase PHP memory to 16M in php.ini, but from what I have read, that has only helped a VERY small percentage of people. I think you might have better luck with this.. :)
User avatar
Marshalrusty
Project Manager
Project Manager
Posts: 29323
Joined: Mon Nov 22, 2004 10:45 pm
Location: New York City
Name: Yuriy Rusko
Contact:

Post by Marshalrusty »

phpBB should remove old sessions. I took a look at your forum and saw "Powered by phpBB 2.0.17 © 2001, 2002 phpBB Group". The version was removed from the footer some versions ago. This leads me to believe that you did not update properly. That said, your forum is probably not working the way it's supposed to. Do you have any MODs installed?
🇺🇦 Made in Ukraine, exported to the USA 🇺🇸

Have comments/praise/complaints/suggestions? Please feel free to PM me.

Need private help? Hire me for all your phpBB and web development needs
jsprague
Registered User
Posts: 21
Joined: Tue Aug 05, 2003 3:07 am
Location: Oregon
Contact:

Post by jsprague »

Unfortunately, it hasn't been updated in a while because PHPBB has been integrated with 3 other pieces of software... I have a couple of minor mods installed.

I guess I could always hire a programmer to solve this for us. :)

And that is good to know about the version - I changed it to prevent hackers from finding the forums..
Locked

Return to “2.0.x Support Forum”