Using python 2 on the same system, the scheduler is rock-solid, but using python 3 the workers die after processing a task. The rest of the tasks are left in queue and the worker entry is deleted from the scheduler_worker table.
Aug 28 20:22:03 ubuntu1806 sudo[16121]: Exception in thread Thread-1: Aug 28 20:22:03 ubuntu1806 sudo[16121]: Traceback (most recent call last): Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/scheduler.py", line 1168, in send_heartbeat Aug 28 20:22:03 ubuntu1806 sudo[16121]: mybackedstatus = db(sw.worker_name == self.worker_name).select().first() Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/objects.py", line 2277, in select Aug 28 20:22:03 ubuntu1806 sudo[16121]: return adapter.select(self.query , fields, attributes) Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 763, in select Aug 28 20:22:03 ubuntu1806 sudo[16121]: return self._select_aux(sql, fields, attributes, colnames) Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 719, in _select_aux Aug 28 20:22:03 ubuntu1806 sudo[16121]: rows = self._select_aux_execute( sql) Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 713, in _select_aux_execute Aug 28 20:22:03 ubuntu1806 sudo[16121]: self.execute(sql) Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 67, in wrap Aug 28 20:22:03 ubuntu1806 sudo[16121]: return f(*args, **kwargs) Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 413, in execute Aug 28 20:22:03 ubuntu1806 sudo[16121]: rv = self.cursor.execute(command , *args[1:], **kwargs) Aug 28 20:22:03 ubuntu1806 sudo[16121]: psycopg2.OperationalError: SSL connection has been closed unexpectedly Aug 28 20:22:03 ubuntu1806 sudo[16121]: During handling of the above exception, another exception occurred: Aug 28 20:22:03 ubuntu1806 sudo[16121]: Traceback (most recent call last): Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner Aug 28 20:22:03 ubuntu1806 sudo[16121]: self.run() Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/scheduler.py", line 637, in run Aug 28 20:22:03 ubuntu1806 sudo[16121]: self.send_heartbeat(counter) Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/scheduler.py", line 1239, in send_heartbeat Aug 28 20:22:03 ubuntu1806 sudo[16121]: db.rollback() Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/base.py", line 708, in rollback Aug 28 20:22:03 ubuntu1806 sudo[16121]: self._adapter.rollback() Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/adapters/__init__.py", line 56, in wrap Aug 28 20:22:03 ubuntu1806 sudo[16121]: return f(*args, **kwargs) Aug 28 20:22:03 ubuntu1806 sudo[16121]: File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 866, in rollback Aug 28 20:22:03 ubuntu1806 sudo[16121]: return self.connection.rollback () Aug 28 20:22:03 ubuntu1806 sudo[16121]: psycopg2.InterfaceError: connection already closed OS is Ubuntu 18.04 server web2py is 2.17.1 postgresql is 10.5 python-psycopg2 and python3-psycopg2 both are 2.7.4-1. The scheduler runs as a systemd service like this: /usr/bin/sudo -u www-data <python> /var/www/web2py/web2py.py -K myapp,myapp:slow,myapp:slowest where <python> is "python" or "python3" -- 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.