![]() |
|
Thread Tools |
#1
|
||||
|
||||
Odd issue with "session" table
I provide technical assistance at a forum running vB 4.2.2, and a few days ago for no apparent reason the "session" table began to fill up and throw a MySQL error preventing our users from using the site.
I directed the site owner to truncate the "session" table via phpMyAdmin, and we were back up. However, the issue came back very soon. The first thing I checked was to make certain the cronimage was intact in all of the footer templates, which it is, and I verified the image is present in the DOM of all the styles. Next I checked the Scheduled Tasks, and verified that the 2 hourly cleanup tasks are being run. One was set at 5 after the hour and the other at 20 after, and I changed to one set at 20 after to 35 after so that the two hourly cleanups would be 30 minutes apart. The issue persisted. As a temporary fix, I wrote a plugin that prunes the "session" table of all expired rows any time one of the 4 senior staff members loads the index, showthread, search and online scripts. When I leave my compute for more than a few minutes I leave Who's Online running so it will auto-refresh and keep pruning the table. Earlier today, I followed: AdminCP -> Maintenace -> Diagnostics -> System Information -> Table Status and I found that the "session" table has very small values for Data_length and Max_data_length: Data_length: 11744 Max_data_length: 12768 At MHB (Math Help Boards) these values are: Data_length: 127296 Max_data_length: 13486755 And on my local dev site, they are: Data_length: 129500 Max_data_length: 14738963 So my questions are:
I appreciate any advice you can give. ![]()
__________________
Former vBulletin.org Staff Member ![]() Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons No members have liked this post.
|
#2
|
||||
|
||||
Anything is possible with a plugin.
To increase the size, look into this MySql query...
The following members like this post: MarkFL, RichieBoy67
|
#3
|
||||
|
||||
What is your session timeout set to?
Admin CP > Settings > Options > Cookies and HTTP Header Options > Session Timeout Some sites try to increase that (by daysssss not minutes) and too large of a session timeout setting without a plugin to conteract it can cause issues as you've described. When you prune the session table, granted it reduces the session table from filling up and preventing access however it also resets the user and if they were previously logged in now they aren't and if in a middle of a post and autosave didn't kick in just in time bam now typed post is now gone as well. Be careful with the session table, you can also simply use sql TRUNCATE to wipe the slate clean but same thing will happen i.e. all users still on the site BUT seems as if everyone logged out all at once that way.
__________________
Daddy Does Dios and Figs! Search - Use the search feature to find similar issues/answers. Information - Include screenshots, copy/pasted error codes, url etc. Fixed - Please return to your thread/post and let us know how it was fixed! Thanks - For participating! Click the "Like" ♥ on a post if someone helped you! The following members like this post: MarkFL
|
#4
|
|||
|
|||
How many entries were in the table and what is the difference between the timestamp of the first and last entry in the table?
Also if it fills up so quickly, are there thousands of bots crawling that forum or something? |
#5
|
||||
|
||||
I don't have phpMyAdmin access, or the ability to run a manual query. And there are just a few bots at any given time.
The site owner did run an "alter table" query, but it had no effect. I'm thinking the database may have to be altered via server config. I just now noticed the max_heap_table_size is set at 16384 while at my local dev site it's at 16777216 (2^10 times as large). We'll have a go at changing that. ![]() --------------- Added 04 Aug 2016 at 23:19 ---------------
Originally Posted by TheLastSuperman
We have the session timeout at 900 right now. So far no one is complaining about being logged out in the middle of a session though. ![]()
![]()
__________________
Former vBulletin.org Staff Member ![]() Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons No members have liked this post.
|
#6
|
||||||||
|
||||||||
I first had the site owner run the manual query:
That didn't work. Then I directed the owner to run the manual query:
That didn't work...and I began to suspect the db would need to be restarted. I directed the owner to the following link: How to edit the MySQL my.cnf file I was informed by the owner:
We still have no idea how the MySQL variable was changed in the first place. ![]()
__________________
Former vBulletin.org Staff Member ![]() Support for my products (as well as updates/new product publishing) has been moved to MHB - vBulletin Products and TAZ - Add-ons No members have liked this post.
|
![]() |
«
Previous Thread
|
Next Thread
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 14:47.