not to point fingers around, but can you try installing psycopg2 ? it'll 
override pg8000 that showed here and there some obscure bugs: pscopg2 is 
certainly more solid. If the same happens with psycopg2, can we see the 
actual function queued (or a function that replicates this behaviour) ?


BTW: send_heartbeat() shouldn't timeout that easily: it's called every 3 
seconds so AT LEAST THAT connection should never be dropped.

On Sunday, November 22, 2015 at 5:00:31 AM UTC+1, kenny c wrote:
>
> I think there is timeout issue on the scheduler and I am not sure which 
> one it is..
>
> Seems to me that the Scheduler stops if it takes longer than 5 minutes in 
> regardless of the value of timeout saved in the task row.
>
> On Saturday, November 21, 2015 at 8:12:05 PM UTC-5, kenny c wrote:
>>
>> HI, I am not sure what causes this issue..
>>
>> I am running Web2py with Postgresql, I am getting this exception in 
>> thread while running a scheduler. and I get InterfaceError("Connection is 
>> closed") .
>>
>> I am wondering if Postgresql has timeout setting or scheduler timeout? (I 
>> made sure that timeout is long enough to handle all the jobs)
>>
>> Any help would be appreciated. Thank you and please see the log below.
>>
>> ERROR:web2py.scheduler.example#6580:Error retrieving status
>> Exception in thread Thread-1:
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
>>     self.run()
>>   File "/home/www-data/web2py/gluon/scheduler.py", line 442, in run
>>     self.send_heartbeat(counter)
>>   File "/home/www-data/web2py/gluon/scheduler.py", line 1041, in 
>> send_heartbeat
>>     db.rollback()
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
>> 937, in rollback
>>     self._adapter.rollback()
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 1332, in rollback
>>     return self.connection.rollback()
>>   File "/home/www-data/web2py/gluon/contrib/pg8000/core.py", line 1429, 
>> in rollback
>>     self.execute(self._cursor, "rollback", None)
>>   File "/home/www-data/web2py/gluon/contrib/pg8000/core.py", line 1622, 
>> in execute
>>     raise InterfaceError("connection is closed")
>> InterfaceError: connection is closed
>>
>> Traceback (most recent call last):
>>   File "/home/www-data/web2py/gluon/shell.py", line 271, in run
>>     exec(python_code, _env)
>>   File "<string>", line 1, in <module>
>>   File "/home/www-data/web2py/gluon/scheduler.py", line 730, in loop
>>     self.wrapped_report_task(task, self.async(task))
>>   File "/home/www-data/web2py/gluon/scheduler.py", line 879, in 
>> wrapped_report_task
>>     db.rollback()
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/base.py", line 
>> 937, in rollback
>>     self._adapter.rollback()
>>   File "/home/www-data/web2py/gluon/packages/dal/pydal/adapters/base.py", 
>> line 1332, in rollback
>>     return self.connection.rollback()
>>   File "/home/www-data/web2py/gluon/contrib/pg8000/core.py", line 1429, 
>> in rollback
>>     self.execute(self._cursor, "rollback", None)
>>   File "/home/www-data/web2py/gluon/contrib/pg8000/core.py", line 1622, 
>> in execute
>>     raise InterfaceError("connection is closed")
>> InterfaceError: connection is closed
>>
>

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