ODOO | Deadlock
psycopg2.errors.SerializationFailure: could not serialize access due to concurrent update

ODOO 14, even we have odoo 14 latest with just upgrade database, it crashing.


2022-07-05 10:03:31,020 362309 INFO www.xxx.in odoo.modules.loading: loading base/security/ir.model.access.csv 

2022-07-05 10:03:31,397 362309 INFO www.xxx.in odoo.addons.base.models.ir_translation: module base: no translation for language en_IN 

2022-07-05 10:03:31,445 362310 ERROR www.xxx.in odoo.sql_db: bad query: update ir_module_module set state='to upgrade' where name='base' and state='installed'

ERROR: could not serialize access due to concurrent update

 

2022-07-05 10:03:31,447 362310 WARNING www.xxx odules.loading: Transient module states were reset 

2022-07-05 10:03:31,447 362310 ERROR www.xxxx.in odoo.modules.registry: Failed to load registry 

2022-07-05 10:03:31,447 362310 ERROR www.xxxx.in odoo.addons.base.models.ir_cron: Unexpected exception while processing cron job {'id': 31, 'ir_actions_server_id': 838, 'cron_name': 'Sold Out Ribbon - Add', 'user_id': 1, 'active': True, 'interval_number': 9, 'interval_type': 'minutes', 'numbercall': -1, 'doall': False, 'nextcall': datetime.datetime(2022, 7, 5, 9, 56, 33), 'lastcall': datetime.datetime(2022, 7, 5, 9, 47, 39), 'priority': 5, 'create_uid': 1, 'create_date': datetime.datetime(2021, 11, 20, 6, 11, 32, 231006), 'write_uid': 2, 'write_date': datetime.datetime(2022, 4, 9, 13, 55, 17, 823916)} 

Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/modules/registry.py", line 63, in __new__

    return cls.registries[db_name]

  File "/odoo/odoo-server/odoo/tools/func.py", line 71, in wrapper

    return func(self, *args, **kwargs)

  File "/odoo/odoo-server/odoo/tools/lru.py", line 34, in __getitem__

    a = self.d[obj]

KeyError: 'www.xxxx.in'


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "/odoo/odoo-server/odoo/addons/base/models/ir_cron.py", line 237, in _process_jobs

    registry = odoo.registry(db_name)

  File "/odoo/odoo-server/odoo/__init__.py", line 104, in registry

    return modules.registry.Registry(database_name)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 65, in __new__

    return cls.new(db_name)

  File "/odoo/odoo-server/odoo/modules/registry.py", line 89, in new

    odoo.modules.load_modules(registry._db, force_demo, status, update_module)

  File "/odoo/odoo-server/odoo/modules/loading.py", line 388, in load_modules

    cr.execute("update ir_module_module set state=%s where name=%s and state=%s", ('to upgrade', 'base', 'installed'))

  File "<decorator-gen-3>", line 2, in execute

  File "/odoo/odoo-server/odoo/sql_db.py", line 101, in check

    return f(self, *args, **kwargs)

  File "/odoo/odoo-server/odoo/sql_db.py", line 300, in execute

    res = self._obj.execute(query, params)

psycopg2.errors.SerializationFailure: could not serialize access due to concurrent update

Solution:  run odoo on single worker and single thread, then update databae, its resolve issue as of now.
Share this post
Tags
Ubuntu / Linux Compress
Tar command compress decompress