Website Crash

TransAmDan

Forum Admin
Staff member
This morning the website was down. If you tried it between midnight and 7am you would have been presented with an error message likes.

Database error in vBulletin 4.2.3:

Invalid SQL:

INSERT IGNORE INTO session
(sessionhash, userid, host, idhash, lastactivity, location, styleid, languageid, loggedin, inforum, inthread, incalendar, badlocation, useragent, bypass, profileupdate, apiclientid, apiaccesstoken, dbtech_vbanalytics_first_location, dbtech_vbanalytics_referer, dbtech_vbanalytics_first_activity)
VALUES
('2faf01a63e829cfa90c234cc4342c9eb', 0, '36.6.155.146', 'c7685c2ace66e8aae6bdd3ca7b5c83e5', 1567751232, 'forumdisplay.php?f=63', 0, 0, 0, 63, 0, 0, 0, 'Mozilla/5.0(Linux;Android 5.1.1;OPPO A33 Build/LMY47V;wv) AppleWebKit/537.36(KHTML,link Gecko) Version/4.0 Chrome/42.0.2311.138 Mobile Safari/537.36 Mb2345Browser/9.0', 0, 0, 0, '', 'a:2:{s:11:"this_script";s:12:"forumdisplay";s:10:"other_data";a:1:{s:5:"forum";i:63;}}', 'https://www.google.com', '1567751232');

MySQL Error : The table 'session' is full
Error Number : 1114
Request Date : Friday, September 6th 2019 @ 03:27:12 AM
Error Date : Friday, September 6th 2019 @ 03:27:12 AM
Script : PS
Referrer :
IP Address : 36.6.155.146
Username : Unregistered
Classname : vB_Database_MySQLi
MySQL Version :

This session table should be able to grow in size. There was 110,000 entries in this table. Usually its just one entry per user. So when we see 200 users online there is only 200 users in the table. This table gets cleaned up once per hour. I have now upped this clean up to every 20mins to see if it happens again. It happens about 1 week ago too, but never happened before that.

Why so many users? well that is a good question. I believe its robots just scouring the website, we can cope with a lot of users, but they are doing something odd. I'm wondering if i can filter it out. One was is IP filtering. you know when you get spam email filters it can look up the server it came from to know if its come from a black listed server, well there is black listed sources for website traffic too. I have a free version in place, but wondering weather its worth upgrading. There are 5 variants i can access. So I may give others ago.

A few of the IP address I pulled from the log were all in China.
 
I got that screen when I tried around 6:39 this morning.
I think restricting registration by some form of anti-robot checker would help.
 
Registration is restricted with one of those human verification things.

It think its unregistered people/bots browsing pages is causing the huge amount of visitors.
 
Yeah saw that. Had to do the database clear out again. The automatic clear out appears to be running. I'll take another look later now it has been running for sone time.
 
And again this morning between 7.27 and 8.30.

Looking at the scheduled tasks they stopped running 6 hours ago. Including the hourly clean up task. I manually ran this and the website came back. It is odd why the scheduled tasks stopped. I can run the hourly clean up from a server scheduled task. It dosn't matter if they both run, and it will keep things cleaned up. Certainly worth a shot.
 
Reading more about the database side of things, the Sessions Table was set to 'Memory' where the other tables are 'MyISAM' some forum answers pointed to converting the tables to 'MyISAM' which I have done. Lets see how it goes tonight.

So far the sessions table is staying nice and clean.
 
Yes seems solid, the 'session' entries are a usual amount. I'll keep an eye on it over the next few days. Fingers crosses its fixed it. A few things were done.

  1. Scheduled tasks are executed when the footer of the web page is loaded by the user, its triggers a look up to see if a scheduled task is due to run. If no one views a page then scheduled tasks don't get run, however we have 100's of page loads per hour so this should happen. By creating an external way to call the scheduled tasks from the server timer then these will get run every hour.
  2. Changed the 'Session' table type from 'Memory' to 'MyISAM' making this the same as all other tables in the database. This should help with size limits, although should have been hit previously, but it is odd why this is the only table in the database that wasn't 'MyISAM'
 
Something is wrong with scheduled tasks. This item at the top runs every 10 mins, but hasn't run for 6 hours.
schedule-tasks.jpg

I'll need to dig into why they are not running, my initial search said to check they are enabled, which they are by the tick next to them. Some posts talk about server time difference. Nothing recently has changed, but something gone a bit wobbly.
 
All seems to still be ticking over well.
Scheduled tasks running.
 
Back
Top