Hi, I used web2py to run scheduled task which execute shell commands, the code of my task as below: p = subprocess.Popen(command_shell, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() return p.returncode If my database is sqlite, everything is ok, but if my database is mysql, then the task will not be completed when the execution time of shell command is longer than 4 minutes. After my task is finished, the status of scheduler_run will still be 'RUNNING', and the status of scheduler_task will be 'QUEUED'. I found that scheduler use a thread to create scheduler_run, and update status of scheduler_run when the task is finished. The database connection of the thread will be broken if the time exceeded 4 minutes and no any exception will the thrown, so the status of scheduler_run can not be updated. But,variable 'wait_timeout' and 'interact_timeout' of my mysql server is 28800, I think the connection should keep alive in 8 hours, So, is this a issue? Have it a workaround solution ? My database is mysql 5.5.50-0ubuntu0.14.04.1, the version of web2py is 2.14.6-stable+timestamp.2016.05.10.00.21.47, they are installed in 2 VMs based Azure. And, I tried MySQLdb, can't work too.
-- 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.