Greetings,

I've been using sqlite-3.4.2 for a customer-only website for a few years
now and the number of users has recently grown to the point where I'm now
seeing too many "database is locked(5)" (i.e. busy) errors.

When my code gets a "database is locked(5)" error, it sleeps for a random
period between 0.25-0.5 seconds and tries again. It repeats this up to 50
times before giving up and I only see an error if all of the repeated
attempts failed as well. I'm now seeing this error a lot.

My use of sqlite seems unable to cope with more than about 30-50 concurrent
updaters. I'm not sure of the exact number. Is that typical? Bear in mind
that every use of this website is recorded in the database for auditing
purposes so all users are updaters.

Each page hit results in several database writes each of which is currently
in a separate transaction. Is combining these into a single transaction likely
to help or make matters worse? Or is this just an inappropriate use of sqlite?

I expect I'll have to migrate it to postgres but I thought I'd ask for opinions
here first.

Cheers,
raf

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to