That should not be a problem. Do you get this regularly or occasionally? Is this a long running thread?
On Mar 17, 10:15 pm, vince <[email protected]> wrote: > mutliprocess yes. i am running under mod_wsgi with single thread but > multi process. > > i do assume the sqlite driver should try to acquire the database file > lock for a specific time instead of return error right away? or is > there any way to catch the error and return some busy page? it should > be apply to other database. for example when mysql server is down. > > the error just appear once in a while so i think it should be just two > process trying to access the database at once. > > On Mar 18, 9:31 am, mdipierro <[email protected]> wrote: > > > I am pretty sure this is not a problem with sqlite timeout. It may be > > a concurrency issue. Do you use the thread module explicitly or > > multiprocessing or background processes? Can you post a minimalist app > > that allows to reproduce the problem? If not can you tells us a little > > more about the application? > > > On Mar 17, 7:51 pm, vince <[email protected]> wrote: > > > > Traceback (most recent call last): > > > File "/home/web2py/gluon/main.py", line 518, in wsgibase > > > session._try_store_in_db(request, response) > > > File "/home/web2py/gluon/globals.py", line 356, in _try_store_in_db > > > table._db(table.id == record_id).update(**dd) > > > File "/home/web2py/gluon/sql.py", line 3244, in update > > > self._db._execute(query) > > > File "/home/web2py/gluon/sql.py", line 895, in <lambda> > > > self._execute = lambda *a, **b: self._cursor.execute(*a, **b) > > > OperationalError: database is locked > > > > i've google about sqlite and some say that sqlite have a default > > > timeout of 5 seconds. > > > > i think it should be able to catch the error when the database file is > > > locked, for other sql database we should be able to catch the error > > > too when the sql server is down. > > > > -vince > > > > On Mar 17, 10:39 pm, mdipierro <[email protected]> wrote: > > > > > What error do you get? What triggers it? I do not think it related to > > > > timeout of database. > > > > > On Mar 17, 6:01 am, vince <[email protected]> wrote: > > > > > > i understand sqlite is not for heavy usage. i just want to know is > > > > > there any way to set the timeout for database file access before > > > > > returning "database is locked" error? > > > > > > also is there any way to catch the error and return some "busy" error > > > > > page? > > > > > > although i do not have problem with for eg. mysql, but i still want to > > > > > know is there any way to catch the error if mysql server is down? > > > > > > -vince -- You received this message because you are subscribed to the Google Groups "web2py-users" 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/web2py?hl=en.

