Page 1 of 1

phpbb sessions question

PostPosted: Mon May 01, 2006 8:22 pm
Author: Driver 7
OK. I have just about had it with the sessions table.

It's constantly filling up. It used to fill up like once a month, but over the last month or so it has been filling up constantly. About every 3 or 4 days.

Does anyone else have this problem? or advice?

Re: phpbb sessions question

PostPosted: Mon May 01, 2006 9:30 pm
Author: Helter
were having that problem here too. I did go to ACP/security/configuration and lower the max sessions from 50 to 30. So far so good.

Re: phpbb sessions question

PostPosted: Mon May 01, 2006 9:56 pm
Author: Driver 7
Thanks bro. I'll give that a shot and see how it works out.

PostPosted: Mon May 01, 2006 10:02 pm
Author: Jason Sanborn
Wouldn't lowering the max sessions make the problem worse, not better?

Re: phpbb sessions question

PostPosted: Mon May 01, 2006 10:11 pm
Author: Driver 7
The explanation for that setting says "If your sessions table gets bigger than this number, the mod will automatically get it below this number."

So it is not actually changing the size of your Max settings I dont think.

Re: phpbb sessions question

PostPosted: Mon May 01, 2006 10:29 pm
Author: Helter
it should make your max smaller, so ideally it will dump the older sessions before the table fills up

PostPosted: Tue May 02, 2006 10:03 am
Author: Jason Sanborn
That is true, but that would also cause users to be logged out unexpectedly, correct? That is an issue my users are experiencing, so I actually upped my count from 50 to 100 to stop it.

Re: phpbb sessions question

PostPosted: Tue May 02, 2006 10:49 am
Author: Dragonsys
The problem is that some ppl's DB has a limit on the sessions table. When this limit is reached you get the above error.

Therefore, if you are getting this error, then you cannot up the limit, you must decrease it.

PostPosted: Wed May 03, 2006 11:37 am
Author: Jason Sanborn
Ok, that makes sense. Thanks for clarifying for me. <img>

Re: phpbb sessions question

PostPosted: Wed May 03, 2006 9:53 pm
Author: Driver 7
Damn. When I made the first post. It was May 1st at 7:22 pm. That was right after I went to phpMyAdmin and emptied the sessions. I just had to do it again. wtf man this is retarted. just 2 days and it's full.

arghhhhhhhhhh

Re: phpbb sessions question

PostPosted: Wed May 03, 2006 9:58 pm
Author: Driver 7
Has anyone else got Google Analytics installed? I wonder if that could be the reason why it's filling up so fast now.

PostPosted: Thu May 04, 2006 9:58 am
Author: Jason Sanborn
I don't have Google Analytics, but I do have Google AdSense, and I notice that Google bots do hit me pretty hard.

Re: phpbb sessions question

PostPosted: Thu May 04, 2006 9:00 pm
Author: Driver 7
I did have As Sence. But I got fired because my squad members would click the ad's 4 or 5 times a day. And I have over 100 members in my squad. lol. I guess Google did not like seeing the same IP's clicking the ad's over the period of a year! The crappy thing was I had kept my earnings in my google account and when they fired my ass they took all the money away. Was over $500.00. But whatever.

I will see if my sessions last longer then this weekend and if it does not then I will remove Anylitics and see if that makes the difference.

Re: phpbb sessions question

PostPosted: Sat Jul 08, 2006 9:41 am
Author: Driver 7
I think I found a solution finally for my sessions problem.

It seems to be working for me now.

I went to php my admin and under operations for the sessions table, I changed the table type from HEAP to MYISAM.

Perhaps anyone having the same problem could try this and see if it works for them.

Re: phpbb sessions question [Solved]

PostPosted: Tue Jul 18, 2006 7:50 am
Author: Driver 7
It has been well over a week since I changed the table to MYISAM and it's not giving me any problems what so ever.

Problem solved!

Re: phpbb sessions question [Solved]

PostPosted: Mon Jul 24, 2006 7:23 pm
Author: Driver 7
I noticed this morning that the sessions tables here were full. I have now gone 15 days after changing my sessions table type to a MYISAM Table. I am curious as to why others are not doing the same? Is there any reason why one would not want to do this.

My sessions tables were filling up every other day before the change.

Re: phpbb sessions question

PostPosted: Mon Jul 24, 2006 9:51 pm
Author: Teelk
Hey Driver 7,

Could you clarify something for me? In the first few posts you say that you changed the sessions table from HEAP to MyISAM, and in the last post you say you changed from MyISAM to HEAP.. <img>

A fresh install of IM 1.4.0(or a recent phpBB version) would create the sessions table as MyISAM. This table type most likely won't fill up as it's MAX_ROWS is usually large enough to handle a busy forum. A HEAP table's MAX_ROWS is much lower, usually set to 550 by your host.

The advantage to using HEAP over MyISAM is that HEAP is much faster as it's kept in memory rather then written to HDD. But, of coarse, it can't handle as many entries as it would most likely crash the server.

Regardless of your session table type you can try to increase the MAX_ROWS to suit the number of sessions that may occur based on your user base.

Run the following query in phpmyadmin.
Code: Select all
ALTER TABLE phpbb_sessions MAX_ROWS = 2500;
You can increase the number of rows past 2500, but it cannot exceed the MySQL max_heap_table_size.

The MySQL people say that MySQL won't let you increase the MAX_ROWS past the max_heap_table_size. But, I've also heard that increasing the MAX_ROWS pas the max_heap_table_size can give you the sessions table full error, so I don't know the truth.

Alternatively, we could introduce a script which would check how many sessions exist for a user ip and once it reaches a certain number, delete the oldest one. That would work great normally, but if you have a number of users behind a proxy then they all couldn't get access to the board.

Re: phpbb sessions question

PostPosted: Tue Jul 25, 2006 7:17 am
Author: Driver 7
oops. Ya I meant to say I changed it from HEAP to MyISAM. <img>

Thanks for the response. My site does not really seem any slower since the change and my server is very stable so far so I will leave it as is I guess.

But I will run that query right now. Thanks bro.

Re: phpbb sessions question

PostPosted: Tue Jul 25, 2006 11:02 am
Author: Teelk
With modern servers and software, plus high-speed internet connections, you most likely won't even notice a difference in speed. It should be set to MyISAM nowadays anyway.

Re: phpbb sessions question

PostPosted: Sat Jan 12, 2008 2:27 am
Author: binh.tang
"Teelk";p="12371" wrote:Hey Driver 7,

Run the following query in phpmyadmin.
Code: Select all
ALTER TABLE phpbb_sessions MAX_ROWS = 2500;
You can increase the number of rows past 2500, but it cannot exceed the MySQL max_heap_table_size.


Hi Teelk,

I ran the command but looking at phpmyadmin, I can see over 2500 rows already! So, I changed it the MAX_ROWS to 5000 instead. The next day, I checked on phpmyadmin, the phpbb_sessions table had over 6000 rows. Isn't that supposed to 'cap' it to 5000 instead?

Not sure what's going on. The php_sessions table was on MyISAM, but I changed it to InnoDB instead and my site seems to run a lot better......

Hopefully someone can shed some light on how to 'kill' unused sessions in the phpbb_sessions table......