[Koha-bugs] [Bug 32558] Allow background_jobs_worker.pl to process multiple jobs simultaneously up to a limit

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Feb 17 09:00:39 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32558

--- Comment #49 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
When I submit 4 stage marc imports with 3 processes (removing the extra fork in
process_job), I get this:

285042 at /usr/share/koha/misc/background_jobs_worker.pl line 93.
285043 82 at /usr/share/koha/misc/background_jobs_worker.pl line 136.
285044 83 at /usr/share/koha/misc/background_jobs_worker.pl line 136.
285045 84 at /usr/share/koha/misc/background_jobs_worker.pl line 136.
C4::ImportBatch::_update_batch_record_counts(): DBI Exception: DBD::mysql::st
execute failed: Deadlock found when trying to get lock; try restarting
transaction at /usr/share/koha/C4/ImportBatch.pm line 392
C4::ImportBatch::_update_batch_record_counts(): DBI Exception: DBD::mysql::st
execute failed: Deadlock found when trying to get lock; try restarting
transaction at /usr/share/koha/C4/ImportBatch.pm line 392
285115 85 at /usr/share/koha/misc/background_jobs_worker.pl line 136.

42 is the pid of the main process; it starts 43, 44 and 45 for three jobs. Job
82 finishes, but 83 and 84 fail concurrently on a deadlock.
Job 85, the fourth import, starts later (which is fine) and finishes ok.

So, this is not a problem of background worker itself, but the transaction in
StageMarcForImport does not (yet) support this operation concurrently.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list