On Wednesday, July 13, 2016 at 12:30:16 PM UTC-7, Chetan Jain wrote: > > while running this file, db is locked. > What to do in such case? > > I find this answer: > > if you can, use a separate db for the scheduler. SQLite doesn't handle > well concurrent writes (with default operational capabilities), so having > the scheduler operating on the same database of your "insertion" of > messages can lead to locks. > [...] >
> > i'm not clear with it > > Best, > Chetan Jain > > Sqlite has more limitations than the "big database engines" like MySQL and and Postgres. One of those limitations is that it can't handle parallel accesses to the database. If you're using Sqlite, you either accept that there will be occasional lockouts or you use two databases. One database, dedicated to the scheduler, will have its own set of locks, and the other database, holding the data being handled by the website, has its own set of locks. A request won't interfere with the scheduler, and the scheduler won't interfere with requests (except when actually accessing the site's data). The code sample (which I snipped) just shows you how to set up the connection strings for these two databases and to refer to the scheduler's database when telling the scheduler what to do. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

