View Full Version : Reason for database errors?
Simon Lloyd
06-17-2013, 08:04 PM
Hi all, i'm getting lots of the below database errors, anyone got a suggestion as to why they hhave started appearing?
Database error in vBulletin 3.8.7:
Invalid SQL:
UPDATE vb_adminutil SET
text = UNIX_TIMESTAMP()
WHERE title = 'datastorelock' AND text < UNIX_TIMESTAMP() - 15;
MySQL Error :
Error Number :
Request Date : Monday, June 17th 2013 @ 09:38:12 PM
Error Date : Monday, June 17th 2013 @ 09:38:12 PM
Script : http://www.mysite.com/forumz/archive/index.php/f-86-p-30.html
Referrer :
IP Address : xxx.xx.xxx.xxx
Username :
Classname : vB_Database
MySQL Version :
snakes1100
06-17-2013, 08:17 PM
Did you disable any exec functionality from php using disable_functions?
Simon Lloyd
06-17-2013, 08:19 PM
No, only thing thats been disabled (AFAIK) is APC caching.
snakes1100
06-17-2013, 08:26 PM
Try a repair on the table first, run it a couple times.
Post up the error logs for php, when this is happening as well.
What caching system are you using?
Simon Lloyd
06-17-2013, 08:35 PM
Im using filecache, i'll take a look at the logs.
snakes1100
06-17-2013, 08:37 PM
Id use memcache or xcache, versus the filecache.
Disable the filecache for now as well in your testing.
Simon Lloyd
06-17-2013, 08:51 PM
the system steup im using doesn't support xcache, i'll take a look at memcache, unfortunately im at work so can't ssh, i cant check the logs or change caching!
snakes1100
06-17-2013, 08:55 PM
Any system would support xcache, as long as you install it, i assume your not on a vps/dedi?
ForceHSS
06-17-2013, 09:29 PM
are you trying to make a new mod if so i can give you site for testing i am not using will install what version u need
Zachery
06-17-2013, 09:33 PM
Don't ever repair or optimize a database if you don't have to. Repairs should only be run if the table is actually crashed. Optimize if and only if you've removed large groups of data from an myisam table.
If you run that query yourself, do you get any errors?
Without an error message hard to tell. php might have timed out and killed the query/connection. or MySQL timed out and killed the query, which made php exit and give you an error. But its weird you're not getting an error message.
Simon Lloyd
06-17-2013, 10:18 PM
Any system would support xcache, as long as you install it, i assume your not on a vps/dedi?Not with the way my setup is, i'm on dedicated box.
are you trying to make a new mod if so i can give you site for testing i am not using will install what version u needNope just all of a sudden had these database isues, but thanks :)
Don't ever repair or optimize a database if you don't have to. Repairs should only be run if the table is actually crashed. Optimize if and only if you've removed large groups of data from an myisam table.
If you run that query yourself, do you get any errors?
Without an error message hard to tell. php might have timed out and killed the query/connection. or MySQL timed out and killed the query, which made php exit and give you an error. But its weird you're not getting an error message.Ok i ran that query through admincp>maintainance>execut query and it spat this out:
Fatal error: Could not obtain file lock in [path]/includes/class_datastore.php on line 807
#0 vb_error_handler(256, Could not obtain file lock, /public_html/forumz/includes/class_datastore.php, 807, Array ([title] => options,[data] => a:1512
And then spat out the entire contents of datastore!
Zachery
06-17-2013, 11:35 PM
How are you storing the datastore? default or in the filesystem/xcache/apc/memcache?
Simon Lloyd
06-17-2013, 11:39 PM
Well here's the rub, around 4 days ago my forum experienced major problems, no access to admincp...etc, the hosts couldn't see what was wrong and asked cpanel to check it out, they said the issue is with cpanel and APC (they dont support it) however its been working fine for a year, but sure enough comment out the line for acp and i had control back (after changing config.php to filecache and turning off apc usage in dbtechs vboptimies mod), so now im running on filecache but it all appears to be there inm the databse just fine?
Zachery
06-17-2013, 11:44 PM
Chances are it cannot write/lock the datastore cache file. Switch back to the normal datastore cache (nothing).
Then try the same query again. Also double check your database user has ALL permissions (short of grant) on its own database.
Simon Lloyd
06-18-2013, 12:09 AM
Hmmm i dont see why the databse user should have changed the forums been the same (all barr creating mods and tinkering) for the last 4 years :)
So you recon if i comment out all caching in config.php that should do it?
Zachery
06-18-2013, 12:22 AM
Its not going to hurt anything, if it doexn't fix anything you can change it back just as easily.
Simon Lloyd
06-18-2013, 12:24 AM
Ok just done that and the query executed fine?? now that we've established that what can i do to enable caching of some sort?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.