OCA / queue

Asynchronous Job Queue
GNU Affero General Public License v3.0
183 stars 460 forks source link

[12] base_import_async. Error at import a log csv of account.lines #224

Closed josemadev closed 4 years ago

josemadev commented 4 years ago

I try paralelize queue.jobs with ODOO_QUEUE_JOB_CHANNELS=root:4 but it dont improve the time required by the importation.

Spanish headers of xlsx: ID externo | Apuntes contables/Empresa | Apuntes contables/Cuenta | Apuntes contables/Debe | Apuntes contables/Haber | Apuntes contables/Fecha | Apuntes contables/Fecha vencimiento | Apuntes contables/Etiqueta | Apuntes contables/Etiquetas analíticas | Apuntes contables/Creador de Impuesto | Apuntes contables/Impuestos aplicados

Num of items: 161498 I observe that transactions are blocked for other transaction.

ERROR: Traceback (most recent call last): File "/opt/odoo/CMNT_00203_2019_ITC/odoo-repos/queue-job/queue_job/controllers/main.py", line 85, in runjob self._try_perform_job(env, job) File "/opt/odoo/CMNT_00203_2019_ITC/odoo-repos/queue-job/queue_job/controllers/main.py", line 32, in _try_perform_job job.perform() File "/opt/odoo/CMNT_00203_2019_ITC/odoo-repos/queue-job/queue_job/job.py", line 465, in perform self.result = self.func(*tuple(self.args), **self.kwargs) File "/opt/odoo/CMNT_00203_2019_ITC/odoo-repos/queue-job/base_import_async/models/base_import_import.py", line 182, in _import_one_chunk raise FailedJobError('\n'.join(error_message)) odoo.addons.queue_job.exception.FailedJobError: could not serialize access due to concurrent update

josemadev commented 4 years ago

https://github.com/odoo/odoo/issues/8585#issuecomment-508987056

guewen commented 4 years ago

It looks like the data you import writes on the same records concurrently, when it happens, one of the transaction is rollbacked with this message. The jobs with concurrent update errors are automatically retried 5 times IIRC, after which they are set to failed.

guewen commented 4 years ago

If you don't have more details, I'm closing it. Feel free to reopen if you have new information.