When two processes try to write to a SQLite database at the same time, the second process will throw a busy exception and you get the "database is locked" error. To remedy this, you can set the busy_timeout on the SQLite connection. This timout is the length of time (in milliseconds) a process will wait for a lock before throwing the busy exception. Usually the wait will only be a few milliseconds, and both processes will succeed.
-- Will Reese Cliff Wells wrote: > On Mon, 2006-08-21 at 16:44 +0200, Alberto Valverde wrote: > > > > On Aug 21, 2006, at 4:07 PM, OriginalBrownster wrote: > > > > > > > > Hi there: > > > > > > I got a problem...I was trying to change some records in a table > > > within > > > my database through the shell. > > > > > > and after I did so I tried to reload my server and view the changes, > > > but now the an error comes up saying the database is locked!. > > > I can't even get into the frontpage > > > > SQLite can't open the same db file with two processes at the same > > time. Try closing the shell. > > I've recently started using SQLite3 for development (deploying on > PostgreSQL) and the "database locked" error happens frequently enough to > convince me SQLite is not a good deployment platform for TG. It happens > most often right after making changes (through TG, not the shell) but > also seems to happen at apparently random intervals. > > Regards, > Cliff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears -~----------~----~----~----~------~----~------~--~---

