I'm getting the following error after my scheduled task completes:

Traceback (most recent call last): File "/home/wdis/web2py/gluon/shell.py", 
line 273, in 
   run exec(python_code, _env) 
File "<string>", line 1, in <module> 
File "/home/wdis/web2py/gluon/scheduler.py", line 717, in loop 
   self.wrapped_report_task(task, self.async(task)) 
File "/home/wdis/web2py/gluon/scheduler.py", line 874, in 
wrapped_report_task 
   db.rollback() 
File "/home/wdis/web2py/gluon/packages/dal/pydal/base.py", line 956, in 
rollback 
   self._adapter.rollback() 
File "/home/wdis/web2py/gluon/packages/dal/pydal/adapters/base.py", line 
1342, in rollback return self.connection.rollback()
OperationalError: (2006, 'MySQL server has gone away')



It appears that the db connection created by the scheduler (to update the 
task status) gets stale and MySQL is closing it. I've tried adding dummy 
reads to the database in my scheduled task code but it seems to have no 
bearing on the db connection used by the scheduler.

Any advice? I'm using PythonAnywhere so I can not change the timeout 
setting for MySQL.

-Andre

-- 
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.

Reply via email to