I think you are right. perhaps the problem is session. Did you try unlock it?
On Nov 11, 12:48 am, VP <[email protected]> wrote: > >- if you are using sqlite, the database is locked (sqlite cannot be > > accessed concurrently) > > Is this true? > I thought sqlite db's can be read (but not written) concurrently. If > so, then even if web2py opens it, and as long as there's no write > access, things still should be fine. Right? > > On Nov 11, 12:38 am, mdipierro <[email protected]> wrote: > > > web2py opens it anyway because it is in the model. > > You can force a release > > > DAL.close_all_instances(DAL.commit) > > > at the beginning of your long action. should work > > > On Nov 11, 12:12 am, VP <[email protected]> wrote: > > > > Didn't think of this, but in fact I'm using sqlite, which seems to be > > > a lot faster than postgreSQL. However, the controller function that > > > i called does not touch the database. So unless web2py opens the > > > database and kind of "leaves it there", it shouldn't happen (right?). > > > > Another behavior is that when I use routes to route the default > > > controller to domain1 and the controller that has this function to a > > > domain2, then there is no blocking for functions called in domain1 > > > (even if this intensive function is running in domain2). > > > > What gives? > > > > On Nov 10, 11:57 pm, mdipierro <[email protected]> wrote: > > > > > I do not think this is locking web2py. But there are two > > > > possibilities: > > > > - if you are using sqlite, the database is locked (sqlite cannot be > > > > accessed concurrently) > > > > - the user session is locked. This means the user who called the long > > > > running process cannot access other actions until his session is > > > > unlocked. You can do this manually in th long running action > > > > (session._unlock()) assuming it does not save anything in the session. > > > > > On Nov 10, 11:54 pm, VP <[email protected]> wrote: > > > > > > I have this problem that I think is related to threading and web2py. > > > > > I have an apache2 standard setup with web2py. > > > > > > One of the function (in controller) is computing intensive, taking up > > > > > to 10+ seconds to execute. When this function is called > > > > > (i.e.http://domain/app/func), the app is locked up. Other functions > > > > > can > > > > > not be run until this function is done. > > > > > > I remember the book mentions the default web2py config is supposed to > > > > > have up to 15 threads. So, this behavior shouldn't happen right? > > > > > > Any help is appreciated. > >

