Bug ID: 20342
Summary: Fix table locking issue, progress bar not updating,
and allow use of plack for Stage MARC Import
Change sponsored?: ---
Priority: P5 - low
Component: Architecture, internals, and plumbing
QA Contact: testo...@bugs.koha-community.org
Have you ever seen this error?
DBD::mysql::st execute failed: Deadlock found when trying to get lock; try
restarting transaction [for Statement "INSERT INTO import_record_matches
(import_record_id, candidate_match_id, score),
Have you ever noticed your progress bar during stage for import jumps from 0%
to 100% with no updates in between?
Would you like stage-marc-import.pl to work under plack?
If you answered yes to any of the following questions, this bug is for you!
During uploads of large records using matching rules, we were getting 'Failed
to submit form' popups on the marc record importer.
First, I noticed that the parent process of stage-marc-import.pl wasn't
returning the job id via ajax until the child process had completed. This works
fine for smaller files as they process fast. For large files ( and in
particular when using matching rules ) the process takes *much* longer.
It appears that $.ajax will resubmit the form if it doesn't get a response back
in a given time ( I would estimate that to be about 30 seconds or so ). This
causes a *second* instance of stage-marc-import.pl to be run. So now we have
two processes both running transactions on the same table for the same batch
id. I believe this is what is causing the Deadlock.
So, the crux of the matter is that for whatever reason, the parent process will
not output until the child process has gone away. Hours of research entailed.
The final answer is that the child process must be detached from the parent
process. I tried doing this via setsid() but it did not help. Finally, I found
that using Net::Server::Daemonize did!
After I had my solution, I decided to see if stage-marc-import.pl and
background-job-progress.pl could now be run under plack, and it appears that
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
Koha-bugs mailing list
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/