Cron failing after loading all modules on 8.0

When I start an instance of tryton-cron, the log shows that it successfully loads all modules but then fails as shown in the excerpt below. The instance eventually dies. I am trying to figure out what could be wrong.

Log excerpt

[2026-09-03 10:05:52] INFO:trytond.modules:all modules loaded
[2026-09-03 10:05:52] CRITICAL:concurrent.futures:Exception in initializer:
Traceback (most recent call last):
File "/usr/local/lib/python3.13/dist-packages/trytond/modules/init.py", line 532, in load_modules
_load_modules(update)
~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/modules/init.py", line 500, in _load_modules
Configuration(1).check()
~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/dist-packages/trytond/modules/product/ir.py", line 21, in check
if self.product_price_decimal != price_decimal:
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/fields/field.py", line 440, in get
return inst.getattr(self.name)
~~~~~~~~~~~~~~~~^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/modelstorage.py", line 1918, in getattr
fields_access = FieldAccess.get_access(
~~~~~~~~~~~~~~~~~~~~~~^
[self.name])[self.name]
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/ir/model.py", line 830, in get_access
groups = User.get_groups()
File "/usr/local/lib/python3.13/dist-packages/trytond/res/user.py", line 631, in get_groups
cursor.execute(*user_group
~~~~~~~~~~~~~~^^^^^^^^^^^^
.join(group, 'LEFT', user_group.group == group.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<3 lines>...
& (group.active == Literal(True))),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
order_by=[user_group.group.asc]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/backend/postgresql/database.py", line 63, in execute
return super().execute(query, params, prepare=prepare, binary=binary)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/psycopg/cursor.py", line 117, in execute
raise ex.with_traceback(None)
psycopg.errors.ProtocolViolation: server conn crashed?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.13/concurrent/futures/process.py", line 233, in _process_worker
initializer(*initargs)
~~~~~~~~~~~^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/cron.py", line 59, in initializer
pool.init()
~~~~~~~~~^^
File "/usr/local/lib/python3.13/dist-packages/trytond/pool.py", line 148, in init
restart = not load_modules(
~~~~~~~~~~~~^
self.database_name, self, update=update, lang=lang,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
activatedeps=activatedeps, indexes=indexes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/modules/init.py", line 529, in load_modules
with Transaction().new_transaction(readonly=not update),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/transaction.py", line 246, in exit
self.stop(type is None)
~~~~~~~~~^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/transaction.py", line 257, in stop
self.rollback()
~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/dist-packages/trytond/transaction.py", line 417, in rollback
self.connection.rollback()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/dist-packages/psycopg/connection.py", line 310, in rollback
self.wait(self._rollback_gen())
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/psycopg/connection.py", line 484, in wait
return waiting.wait(gen, self.pgconn.socket, interval=interval)
^^^^^^^^^^^^^^^^^^
File "psycopg_binary/pq/pgconn.pyx", line 255, in psycopg_binary.pq.PGconn.socket.get
psycopg.OperationalError: the connection is lost
Traceback (most recent call last):
File "/usr/local/bin/trytond-cron", line 8, in
sys.exit(main())
~~~~^^
File "/usr/local/lib/python3.13/dist-packages/trytond/cli/cron.py", line 23, in main
cron.run(options)
~~~~~~~~^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/cron.py", line 39, in run
executor.submit(run_cron, database_name)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/concurrent/futures/process.py", line 786, in submit
raise BrokenProcessPool(self._broken)
concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore

I use psycopg3 and pgbouncer

For some reason the connection to the database is broken ProtocolViolation.

This may be linked to pgbouncer usage.
It is strange because the query from User.get_groups has nothing particularly special. But it may be due to the previous query executed.

The tryton-cron failure happens only after I have activated all the modules. When only the ir and res are activated, tryton-cron does not fail. On the contrary, the trytond server continues to run even when all the modules have been activated

For sure the product price decimal is not checked if you do not activate the product module.
But for me it is not the root cause, it is simply that without other modules the cron does mainly nothing and so it does not crash if it does not connect to the database.

The issue was that I had limited the cpus and memory available to the docker instance to 2 and 4g respectively. I cleared the deploy limits and the cron stabilized. No issue with my use of pgbouncer.

The only reported error is specific to a module, which does not affect the whole stability, viz…

[2026-09-05 15:59:00] ERROR:trytond.ir.cron:<Cron 36@db_idoiosufodu account.invoice.chorus|send> failed after 4 ms
Traceback (most recent call last):
File "/usr/local/lib/python3.13/dist-packages/trytond/ir/cron.py", line 266, in run
task.run_once()
~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/descriptors.py", line 31, in newfunc
return self.func(owner, [instance], *args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/modelview.py", line 799, in wrapper
return func(cls, records, *args, **kwargs)
File "/usr/local/lib/python3.13/dist-packages/trytond/modules/product_cost_warehouse/ir.py", line 23, in run_once
super().run_once([cron])
~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/modelview.py", line 799, in wrapper
return func(cls, records, *args, **kwargs)
File "/usr/local/lib/python3.13/dist-packages/trytond/modules/company/ir.py", line 86, in run_once
super().run_once([cron])
~~~~~~~~~~~~~~~~^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/descriptors.py", line 33, in newfunc
return self.func(owner, *args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.13/dist-packages/trytond/model/modelview.py", line 799, in wrapper
return func(cls, records, *args, **kwargs)
File "/usr/local/lib/python3.13/dist-packages/trytond/ir/cron.py", line 209, in run_once
getattr(Model, method)()
~~~~~~~~~~~~~~~~~~~~~~^^
TypeError: InvoiceChorus.send() missing 1 required positional argument: 'records'