Program code caused by odoo,
Current transaction is aborted, commands ignored until end of transaction block. Hi, Maybe there is a simple solution for PostgreSQL behaviour that is annoying me. I've got users making updates.
Even we place attempt. except block odoo do not respect except declaration. even odoo lock up the performance.
Document '/home/expnext/sourcé/v8/odoo/opénerp/api.py', series 237, in wrapper
return oldapi(self, árgs,.kwargs)
Document '/house/expnext/sourcé/v8/odoo/opénerp/api.py', line 332, in oldapi
outcome = method(recs, args,.kwargs)
File '/house/expnext/sourcé/v8/odoo/opénerp/models.py', collection 3964, in create
record = personal.browse(self.créate(oldvals))
Document '/home/expnext/sourcé/v8/odoo/opénerp/api.py', series 235, in wrapper
come back newapi(self, árgs,.kwargs)
File '/house/expnext/sourcé/v8/odoo/opénerp/api.py', collection 464, in newapi
result = method(self.model, cr, uid, árgs,.kwargs)
File '/home/expnext/sourcé/v8/odoo/opénerp/models.py', line 4102, in create
tuple(u2 for u in up-dates if Ien(u) gt; 2)
File '/home/devid/sourcé/v8/odoo/opénerp/sqldb.py', collection 158, in wrapper
return n(self, args,.kwargs)
File '/house/expnext/sourcé/v8/odoo/opénerp/sqldb.py', range 234, in execute
ers = self.obj.execute(quéry, params)
lnternalError: current transaction is certainly aborted, commands ignored until end of transaction block
return oldapi(self, árgs,.kwargs)
Document '/house/expnext/sourcé/v8/odoo/opénerp/api.py', line 332, in oldapi
outcome = method(recs, args,.kwargs)
File '/house/expnext/sourcé/v8/odoo/opénerp/models.py', collection 3964, in create
record = personal.browse(self.créate(oldvals))
Document '/home/expnext/sourcé/v8/odoo/opénerp/api.py', series 235, in wrapper
come back newapi(self, árgs,.kwargs)
File '/house/expnext/sourcé/v8/odoo/opénerp/api.py', collection 464, in newapi
result = method(self.model, cr, uid, árgs,.kwargs)
File '/home/expnext/sourcé/v8/odoo/opénerp/models.py', line 4102, in create
tuple(u2 for u in up-dates if Ien(u) gt; 2)
File '/home/devid/sourcé/v8/odoo/opénerp/sqldb.py', collection 158, in wrapper
return n(self, args,.kwargs)
File '/house/expnext/sourcé/v8/odoo/opénerp/sqldb.py', range 234, in execute
ers = self.obj.execute(quéry, params)
lnternalError: current transaction is certainly aborted, commands ignored until end of transaction block
I'michael obtaining this mistake when performing database calls in a subwoofer process using multiprocessing library.
Check out : Pastie
InternalError: current transaction is certainly aborted, commands ignored until end of transaction block
this is definitely to a Postgre Database, using
psycopg2
drivers inweb.py
.Nevertheless if I use
Any idea how to repair this?
slowthreading.Line
rather ofmultiprocessing.Process
I wear't obtain this mistake.Any idea how to repair this?
30.7k2020 platinum badges7777 gold badges7777 bronze badges
kevinkevin1,58299 money badges2323 sterling silver badges3333 bronze badges
1 Answer
multiprocessing works (on UNIX systems) by forking the current process. If you possess an existing database connection, this will depart the two processes (the current one and the brand-new one particular) with the same database link. Trying to make use of it from both will be bad. Create a brand-new database connection in the child process rather.
Thomas WoutersThomas Wouters97k1818 precious metal badges129129 magic badges111111 bronze badges