I've recently upgraded to web2py Version 
2.24.1-stable+timestamp.2023.03.23.05.07.17
It's running on python 3.9.14, Rocky Linux RHEL9, using PostgreSQL 15.2 for 
database.

Since I did the upgrade, the scheduler fails from time to time with this 
traceback:

ERROR:web2py.scheduler.main#1531711:    error storing result
Traceback (most recent call last):
  File "/var/www/medios/gluon/scheduler.py", line 1077, in 
wrapped_report_task
    self.report_task(task, task_report)
  File "/var/www/medios/gluon/scheduler.py", line 1101, in report_task
    db(sr.id == task.run_id).update(
  File "/var/www/medios/gluon/packages/dal/pydal/objects.py", line 2789, in 
update
    ret = db._adapter.update(table, self.query, row.op_values())
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/base.py", line 
586, in update
    raise e
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/base.py", line 
581, in update
    self.execute(sql)
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/__init__.py", 
line 69, in wrap
    return f(*args, **kwargs)
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/base.py", line 
468, in execute
    rv = self.cursor.execute(command, *args[1:], **kwargs)
psycopg2.OperationalError: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
Traceback (most recent call last):
  File "/var/www/medios/gluon/scheduler.py", line 1077, in 
wrapped_report_task
    self.report_task(task, task_report)
  File "/var/www/medios/gluon/scheduler.py", line 1101, in report_task
    db(sr.id == task.run_id).update(
  File "/var/www/medios/gluon/packages/dal/pydal/objects.py", line 2789, in 
update
    ret = db._adapter.update(table, self.query, row.op_values())
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/base.py", line 
586, in update
    raise e
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/base.py", line 
581, in update
    self.execute(sql)
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/__init__.py", 
line 69, in wrap
    return f(*args, **kwargs)
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/base.py", line 
468, in execute
    rv = self.cursor.execute(command, *args[1:], **kwargs)
psycopg2.OperationalError: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/var/www/medios/gluon/shell.py", line 321, in run
    exec(python_code, _env)
  File "<string>", line 1, in <module>
  File "/var/www/medios/gluon/scheduler.py", line 949, in loop
    self.wrapped_report_task(task, self.execute(task))
  File "/var/www/medios/gluon/scheduler.py", line 1082, in 
wrapped_report_task
    db.rollback()
  File "/var/www/medios/gluon/packages/dal/pydal/base.py", line 825, in 
rollback
    self._adapter.rollback()
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/__init__.py", 
line 57, in wrap
    return f(*args, **kwargs)
  File "/var/www/medios/gluon/packages/dal/pydal/adapters/base.py", line 
1012, in rollback
    return self.connection.rollback()
psycopg2.InterfaceError: connection already closed


I've checked PostgreSQL logs but there is no error or apparent problem at 
the time scheduler fails. The database instance has several databases and 
no error log is reported, everything runs smoothly. It's just the scheduler 
that reports that error (and after it, it doesn't run anymore). Where else 
should I look?

Any help will be much appreciated.
Warm regards,
Lisandro

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/9ffdc6f1-8448-4784-a344-7f176545e9d9n%40googlegroups.com.

Reply via email to