Sub Menu
Links Menu
Online Users

In total there are 316 users online :: 3 registered, 0 hidden and 313 guests

Most users ever online was 1091 on Wed Aug 16, 2023 5:27 pm

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot] based on users active over the past 60 minutes

phpbb sessions question

Support for IntegraMOD 140

Moderator: Integra Moderator

Re: phpbb sessions question [Solved]

PostAuthor: Driver 7 » Mon Jul 24, 2006 6:23 pm

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.
Last edited by Driver 7 on Tue Jul 25, 2006 6:03 am, edited 1 time in total.
[img=left]http://www.btusquad.net/stuff/new_sig.gif[/img]
User avatar
Driver 7
Integra Member
Integra Member
 
Posts: 129
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 26, 2006 5:25 pm
Cash on hand: 0.00
Location: Vancouver, BC

Re: phpbb sessions question

PostAuthor: Teelk » Mon Jul 24, 2006 8:51 pm

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.
Last edited by Teelk on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 5:25 pm
Cash on hand: 0.00
Location: Canada

Re: phpbb sessions question

PostAuthor: Driver 7 » Tue Jul 25, 2006 6:17 am

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.
Last edited by Driver 7 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[img=left]http://www.btusquad.net/stuff/new_sig.gif[/img]
User avatar
Driver 7
Integra Member
Integra Member
 
Posts: 129
Likes: 0 post
Liked in: 0 post
Joined: Sun Mar 26, 2006 5:25 pm
Cash on hand: 0.00
Location: Vancouver, BC

Re: phpbb sessions question

PostAuthor: Teelk » Tue Jul 25, 2006 10:02 am

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.
Last edited by Teelk on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
Teelk
Dev Team
Dev Team
 
Posts: 1309
Likes: 0 post
Liked in: 0 post
Joined: Tue Mar 14, 2006 5:25 pm
Cash on hand: 0.00
Location: Canada

Re: phpbb sessions question

PostAuthor: binh.tang » Sat Jan 12, 2008 1:27 am

"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......
Last edited by binh.tang on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
binh.tang
Members
Members
 
Posts: 43
Likes: 0 post
Liked in: 0 post
Joined: Tue Feb 06, 2007 12:11 pm
Cash on hand: 0.00

Previous

Return to IntegraMOD 140

Who is online

Registered users: Bing [Bot], Google [Bot], Majestic-12 [Bot]

cron