Thanks for your answer massimo. The problem is that the thread im creating "use to" last longer than the request dispatch, and it needs its own connection opened until is done (importing bulk data into the database). Thats why i cannot .join the thread, i let the request finish, and the importation keeps going.
If DAL acts like a singleton and the connection is in the pool it may be a problem if tries to reuse it. Im declaring the thread's connection with pool_size = 0 but i dont know if thats enough. So far it works wonders, i can attach any kind of statistics about the thread's progress without ever touching the database, the importation proccess takes 4mins (40k rows) top when the scheduler takes 20/30+mins. The downside is im responsible to close the connection, and program a proper locking and deadlocks. If that thread fails for any reason and the connection isnt closed properly is when problems arises, max connections reached, unresponsive application and such. Ill take my chances since this technique is so powerful i would like to take advantage of it. Thanks. -- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.