Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

Repeated Serialization Errors("could not serialize access due to concurrent update") in Postgres Database

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
postgresqlodoo8.0
1 Răspunde
34708 Vizualizări
Imagine profil
Pavan Teja

Hi Community,

We are facing the error "*could not serialize due to concurrent update*" too 
many times in our production server. 

The errors are occurring due to the "Repeatable Read" isolation level. I 
know that the database default_transaction_isolation is "Read Committed" 
where we don't get these errors. 

But when I monitored the queries the application(ODOO) user is issuing "SET 
default_transaction_isolation to Repeatable Read". So is the cause of these 
errors.  I have explored on the ODOO application side where in which I lost 
somewhere  but found to know that these errors are common for ODOO. 

In one of the ODOO application files named "sql_db.py" the below code I have 
found where I understood the isolation level was set to "Repeatable Read". 

My concern here is if I change this isolation level to "Read Committed" will 
this suffice to stop this error occurrence? 

3
Imagine profil
Abandonează
OdooBot
Hi,

Did you answer my question??

Looking forward to hearing from you.

Regards, 
Pavan Teja, 
9841380956 

On Wed, 17 Apr, 2019, 12:57 PM Mitul Shingala, <shingalamitul0023@gmail.com> wrote:

A new question Repeated Serialization Errors("could not serialize access due to concurrent update") in Postgres Database on Help has been posted. Click here to access the question :

See question


Sent by Odoo S.A. using Odoo.

Imagine profil
Brain Station 23
Cel mai bun răspuns

Frequently we encounter with this problem that when multiple user(transaction) tries to update a same record/row of a table at the same time, the DBMS fail to serialize the access to the record/row hence throws an error saying, 'could not serialize access due to concurrent update'.Below is the solution that can prevent this kind of data race condition.


with self.env.cr.savepoint():
​self.env.cr.execute("SELECT id FROM YOUR_MODEL WHERE id = %s FOR UPDATE", (ID_Of_The_Records_to_lock,))
#​ update Records or Any ORM Operation inside the scope

In the code above, when the code execution enters the scope of the savepoint context, we are executing a query to acquire a row level lock on some rows of the table by their ID so that no other transaction can update/modify the same records until the lock is released. The lock will be released when an explicit commit on the cursor is done or a rollback is done.


Thanks & Regards, 

 

Brain Station 23 Ltd. 

Mobile: (+880) 1404055226 

Email: sales@brainstation-23.com 

Web: https://brainstation-23.com/ 

Address: (Building-1) 8th Floor, 2 Bir Uttam AK Khandakar Road, Mohakhali C/A, Dhaka 1212, Bangladesh 

4
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to create a new row in a table ?
environment postgresql odoo8.0
Imagine profil
Imagine profil
2
sept. 22
8768
can't restore .sql database why? help ?? Rezolvat
postgresql restore odoo8.0
Imagine profil
Imagine profil
Imagine profil
2
mai 16
5157
When Odoo 14 connects to PostgreSQL 15.7, the connection is idle but cannot be released
postgresql
Imagine profil
0
feb. 25
2982
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
postgresql
Imagine profil
Imagine profil
Imagine profil
2
ian. 25
10285
how to implement joint piece in odoo 8 in one view
odoo8.0
Imagine profil
0
apr. 24
2702
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now