View Full Version : Database error
GoHorns123
08-21-2007, 08:39 PM
Can anyone tell me why I would get this database error for a couple of hours, and then the board went back to being fine & running. What would cause this error?
Invalid SQL:
SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcac
he','stylecache','languagecache','products','plugi nlist','cron','pr
ofilefield','userstats','birthdaycache','maxlogged in','iconcache','eventcac
he','mailqueue');
MySQL Error : User 'i' has exceeded the 'max_questions' resource (current value: 50000)
Error Number : 1226
Paul M
08-21-2007, 08:40 PM
Because you hit a limit set by your host, that limit is a timed limit so once the time has expired you are ok again.
Kirk Y
08-21-2007, 08:41 PM
To my knowledge, the "max_questions" resource refers to the amount of SELECT queries that are allowed to be performed per hour, so after that hour passed - you were fine.
GoHorns123
08-21-2007, 08:52 PM
Our board isn't busy at all. Maybe 9 people post there, and we've never seen that error before. That's why I was confused to why we got that error.
What exactly is select queries? Is that hits to the board?
Kirk Y
08-21-2007, 08:57 PM
If I'm right in it being due to SELECT queries; they retrieve information previously stored in your database - ie: posts, users, statistics, etc.
Eikinskjaldi
08-21-2007, 08:59 PM
Our board isn't busy at all. Maybe 9 people post there, and we've never seen that error before. That's why I was confused to why we got that error.
What exactly is select queries? Is that hits to the board?
Depends on how many people are connected as "user i"
select queries are queries which select (extract data from) the database. As opposed to insert queries (which insert data into the database)
GoHorns123
08-21-2007, 09:00 PM
Hmmm, so someone was retrieving previously stored info from our database? There are only 2 of us that are supposed to be connected to user" i". Me or the other admin weren't doing that at the time we got that error. So that would mean we have someone else that can access our database, right?
Eikinskjaldi
08-21-2007, 09:02 PM
Hmmm, so someone was retrieving previously stored info from our database? Me or the other admin weren't doing that at the time we got that error. So that would mean we have someone else that can access our database, right?
Almost all vb info lives in a db. if you view a forum, thread, post, user info, basically anything and everything, you are looking at data from the db.
GoHorns123
08-21-2007, 09:13 PM
Almost all vb info lives in a db. if you view a forum, thread, post, user info, basically anything and everything, you are looking at data from the db.
I got that part. What I'm not understanding is why we would have gotten that error. Even when our board was big we never got a database error like that. Now, only a few people post there and it isn't busy at all. I'm just wondering if our ex admin that flipped out on us was running inquiries and that's why we got that error. Only one person was on the board at the time it went down, and we shouldn't have reached "max_questions.
See what I'm saying?
And you have to excuse me if I'm asking stupid questions or not understanding , I'm just learning about this stuff.
I don't know if it matters but this was with the database error. It has a IP number with it, but I have no idea what that means. I'm guessing it means it was a person trying to get onto the board when we were down.
"Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT *
FROM session
WHERE userid = 0
AND host = '74.6.25.203'
AND idhash = '67264e443604f5f10d3bd6750ed99119'
LIMIT 1;"
Eikinskjaldi
08-21-2007, 11:46 PM
I got that part. What I'm not understanding is why we would have gotten that error. Even when our board was big we never got a database error like that. Now, only a few people post there and it isn't busy at all. I'm just wondering if our ex admin that flipped out on us was running inquiries and that's why we got that error.
It is possible. Either that or there is some really poor/inefficient code in your system that is making a lot of db calls.
Run the board in debug mode and have a look at how many queries your pages generate.
As for the error, was there more to the message? some indication of what the invalid sql was or perhaps an error message?
GoHorns123
08-22-2007, 01:39 AM
This is the entire message - it's happening again, right now - and there is no one logged into the board.
Database error in vBulletin :
Invalid SQL:
SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','stylecache','languagecach e','products','pluginlist','cron','profilefield',' userstats','birthdaycache','maxloggedin','iconcach e','eventcache','mailqueue');
MySQL Error : User 'indiscri' has exceeded the 'max_questions' resource (current value: 50000)
Error Number : 1226
Date : Tuesday, August 21st 2007 @ 07:27:00 PM
While I was typing, a second error came in.
Database error in vBulletin :
Invalid SQL:
SELECT *
FROM datastore
WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','stylecache','languagecach e','products','pluginlist','cron','profilefield');
MySQL Error : User 'indiscri' has exceeded the 'max_questions' resource (current value: 50000)
Error Number : 1226
Date : Tuesday, August 21st 2007 @ 07:29:41 PM
Script : http://www.XXX.com/forums/arcade.php?do=stats&gameid=8 (edited out board name & url for security)
Referrer :
IP Address : xxx.xx.xxxx
Username :
Classname : vb_database
Eikinskjaldi
08-22-2007, 01:58 AM
Like I said, run it in debug mode, see how any queries are being generated.
GoHorns123
08-22-2007, 02:00 AM
Sorry to be annoying, but how do I do that?
For example, I can't even access my databases. I try to log into phpmyadmin and it says "no databases" and the same error message.
Eikinskjaldi
08-22-2007, 02:37 AM
turn your board off so that others cannot access it
add the following to config.php
$config['Misc']['debug'] = true;
When you load a page, at the bottom you will see a full workup of all the files called and number of database queries made.
You might have to wait an hour for the timeout you are experiencing to reset itself.
GoHorns123
08-22-2007, 02:45 AM
Thank you. So I should just wait out this database error, and then attempt these steps?
On a side note, the exadmin that I mentioned previously has made her own board, using vb, and the same host we have - when we go down, we notice she has gone down too - odd? It's happened about 3 times... could our forums be connected somehow?
Eikinskjaldi
08-22-2007, 03:51 AM
Thank you. So I should just wait out this database error, and then attempt these steps?
On a side note, the exadmin that I mentioned previously has made her own board, using vb, and the same host we have - when we go down, we notice she has gone down too - odd? It's happened about 3 times... could our forums be connected somehow?
Yep, wait it out.
She had full access to your system. For all I know she is using your forums. If she has ssh access and/or database access then she could write a script that calls your db 50000 times a minute.
Anything is possible.
GoHorns123
08-22-2007, 04:00 AM
So what can I do to see if she's using our forums? Or what can I do to change it to make sure she can't use our forums?
Eikinskjaldi
08-22-2007, 06:41 AM
So what can I do to see if she's using our forums? Or what can I do to change it to make sure she can't use our forums?
Assuming she didn't have root ssh access to the server:
Change all passwords, clear all php files, relaod a new version of the code from vb
Assuming she did have root access to the server:
ask your techs for a hard drive wipe and compete system re-install
GoHorns123
08-22-2007, 11:02 AM
I think honestly, this is the case
If she has ssh access and/or database access then she could write a script that calls your db 50000 times a minute.
So how do I remover her ssh access?
By the way, it's now the next morning and the board is still down. Same DB error.
Ok, weird.
I just got our vb board up again... and the way I did that was to install a temporary phpbb board. Once I installed that - our normal forums were up and running, like it recognized our databases again.
This happened the same way the other night.
Any thoughts on this?
Update : We are now up, and their forums are down.
Eikinskjaldi
08-22-2007, 12:12 PM
I think honestly, this is the case
So how do I remover her ssh access?
This is not something I can explain to you via post. If she has any skill she could have hidden an account anywhere on the system. You need to know how to search for it.
Ok, weird.
I just got our vb board up again... and the way I did that was to install a temporary phpbb board. Once I installed that - our normal forums were up and running, like it recognized our databases again.
This happened the same way the other night.
Any thoughts on this?
Update : We are now up, and their forums are down.
I have no idea on this. There is just so much it could be, and trying to fix the problem a post at a time is difficult.
GoHorns123
08-22-2007, 12:31 PM
turn your board off so that others cannot access it
add the following to config.php
$config['Misc']['debug'] = true;
Where in the config.php file would I add that?
Eikinskjaldi
08-22-2007, 12:36 PM
Where in the config.php file would I add that?
Anywhere you like. I put mine at the bottom (inside the <?...?> php tags, of course)
GoHorns123
08-22-2007, 12:45 PM
Thank you!
And I hate to ask so many questions but how do I turn the forums off. I can't figure it out.
Eikinskjaldi
08-22-2007, 01:24 PM
Thank you!
And I hate to ask so many questions but how do I turn the forums off. I can't figure it out.
in admincp->vbulletin options->turn forums on or off
I dont remember the exact syntax, since site's my hard drive crashed 5 hours ago.
GoHorns123
08-22-2007, 01:37 PM
Found it, thank you so much!
Geez, I suck.
I uploaded a new config file and now I'm getting this error. What did I do wrong?
Parse error: parse error, unexpected T_IF in /home/indiscri/public_html/forums/includes/config.php on line 29
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.