FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » General » Database discussions » HY000: database is locked
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
HY000: database is locked [message #168270] Wed, 03 April 2013 03:14 Go to next message
kwag is currently offline  kwag   Puerto Rico
Messages: 6
Registered: April 2013
Location: San Juan, PR.
Karma: 0
Junior Member
Hello

I am getting this type of error too many times a day!
I thought it was the VPS where I was running the forum, but I just moved to another VPS, and I get the same errors.

Snippet:

(/var/www/html/index.php:237
/var/www/html/theme/default/post.php:1147
/var/www/html/theme/default/post.php:4383
/var/www/html/index.php:1347
) HY000: database is locked
Database version: 3.6.20

I'm running FUDforum 3.0.4. on Centos 6.4 64 bit version.
Had the same problem when it was running on Debian 6.

Is there something I should look into, maybe at the OS level?
Or is this a PHP issue with sqlite?
When this error happens, users get the "Retry" page, after a timeout period.

Thanks in advance,
Karl
Re: HY000: database is locked [message #168271 is a reply to message #168270] Wed, 03 April 2013 05:57 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Are you using SQLite? SQLite is ment for single user or low concurrecy environments.
Consider switching to MySQL or one of the other supported databases.
Re: HY000: database is locked [message #168272 is a reply to message #168271] Wed, 03 April 2013 12:51 Go to previous messageGo to next message
kwag is currently offline  kwag   Puerto Rico
Messages: 6
Registered: April 2013
Location: San Juan, PR.
Karma: 0
Junior Member
Thanks for replying.
naudefj wrote on Wed, 03 April 2013 01:57
Are you using SQLite?

Yes.Quote:

SQLite is meant for single user or low concurrency environments.
Consider switching to MySQL or one of the other supported databases.

I know. But the problem seems is not related to concurrency, because I see the error happen even when there's nobody logged in Exclamation
The way I have the forum set up, no anonymous posts are permitted, so there are no "writers", unless there's actually someone logged in and doing a post.
SQLite doesnt have a problem with hundreds of simultaneous readers. I do that every day, on other non-forum related stuff.
I have seen the error even when I am the only user logged in, so there is another issue.
And other times when there are 5 or 6 users posting, there are no errors Exclamation
There must be some lock contention somewhere.

But anyway, if there's no workaround for this, can I migrate the SQLite database I already have into MySQL or Postgres Question

Thanks

Re: HY000: database is locked [message #168303 is a reply to message #168272] Sun, 14 April 2013 07:07 Go to previous message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
The problem is most definitely related to concurrency. Remember that all users and bots hat visit your site will somehow interact with the database.

You can try to use the forum's export and import functions to move between databases, it may work if you are lucky and know how to fix minor data related issues.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Regenerate tv table without running consistency checker
Next Topic: Insert html content as a value into mysql database?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 00:27:24 GMT 2024

Total time taken to generate the page: 0.02398 seconds