'database is locked' errors

RESOLVED FIXED

Status

Webtools Graveyard
Verbatim
RESOLVED FIXED
8 years ago
a year ago

People

(Reporter: wenzel, Unassigned)

Tracking

Details

(Reporter)

Description

8 years ago
I am getting an increasing amount of 'database is locked' errors, particularly when I work with Verbatim on different tabs at the same time.

Not only are all write actions quite slow, I also run into the locking errors all the time, and I have a feeling the users will, as well.

We should probably investigate using MySQL again. Wil: Was there any reason in particular why you guys abandoned MySQL in favor of SQLite?
I don't remember anything specific.  I think any problems we had were was the abstraction, but I'm sure you'll find out soon. ;)

There might have been a couple sqlite-specific queries in pootle, maybe?  I don't remember.
(Reporter)

Comment 2

8 years ago
Thanks for the info, Wil. CCing Dwayne: Is there any reason why people wouldn't want to use MySQL as DB backend for Pootle? Is this a common setup? (It feels like it should be ;))

This problem is really becoming unacceptable: When I open five tabs (read-only, mind you), the first one will load after about 10 seconds, the remaining four will end up showing an OperationalError due to a locked DB.

Might this be related to bug 1051 over in Pootle's bug tracker (http://bugs.locamotion.org/show_bug.cgi?id=1051)?
There is no reason not to.  I think we (mozilla) added the mysql support just to prevent this.

We moved to sqlite relatively late and it was only a temporary thing.  I wanted to get pootle setup using the defaults (since this was all right after the merge) and then switch to mysql, and then migrate users/permissions.
(Reporter)

Comment 4

8 years ago
Ah, nice, that means somewhere on the "road to production" there's a nice little "use MySQL" bug. Which this one may just turn into. Sigh ;)
You mean bug 444621? ;)
(Reporter)

Comment 6

8 years ago
Funny. Looks like you closed this bug for the mere reason that Pootle *can* use MySQL, not because our instance *does* ;)

Comment 7

8 years ago
@wenzel: Friedel probably know better.  But I think the logic has been. 1) Yes we want to support other DBs, 2) Abstraction would be needed for that, 3) Lets get the DB stable with all the changes before we deal with abstraction.

Might be best to talk on IRC with Friedel about what his ideas are and how to proceed.

I agree its a desired feature, especially on large installations.
Fun story: I switched bosley from sqlite to mysql because I was getting locking errors with sqlite in what I thought was completely valid code that shouldn't have any conflicting inserts.

All the locking errors are gone.  sqlite just can't handle heavy concurrency.
(Reporter)

Comment 9

8 years ago
(In reply to comment #8)
> All the locking errors are gone.  sqlite just can't handle heavy concurrency.

s/heavy/any/ ?

Comment 10

8 years ago
A heads up.  The stats cache, which is generated by tools in the Translate Toolkit, is using sqlite and not going through Django.
since the update to Pootle 2.0.0-rc2 we cannot reproduce this. Reopen if needed.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Assignee)

Updated

a year ago
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.