[Koha-bugs] [Bug 8970] MARC import gives error under Starman/Plack

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 23 07:15:43 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8970

Robin Sheat <robin at catalyst.net.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |In Discussion

--- Comment #17 from Robin Sheat <robin at catalyst.net.nz> ---
OK, while I haven't nailed this down exactly, I think I have some hints that
there's a race condition happening. I also get plain weird things like:

DBD::mysql::db selectrow_array failed: Cannot add or update a child row: a
foreign key constraint fails (`koha_test`.`import_biblios`, CONSTRAINT
`import_biblios_ibfk_1` FOREIGN KEY (`import_record_id`) REFERENCES
`import_records` (`import_record_id`) ON DELETE CASCADE ON UPDATE CASCADE) at
/mnt/catalyst/koha/C4/Context.pm line 618.

and that line in C4::Context is requesting a preference. So I think that we
have some sort of race condition going on. Also, forking a plack process is a)
tricky, and b) memory heavy (which is why the fork was failing for me in the
first instance, it started working when I changed my VM from 512MB to 1024MB.)

However, I think there's something odd going on with dbh in the forked process
and the original process interacting in bad ways.

It seems to me that the best(?!) way to sort this is to rewrite the way the
whole background processing stuff works, and to using a queueing daemon that
handles forking and processing. This is cleaner overall than forking a web
process anyway. However, it's a fairly substantial amount of work.

A quick grep for 'fork' suggests that the following scripts may be affected by
this:
tools/stage-marc-import.pl
tools/batchMod.pl
tools/manage-marc-import.pl
offline_circ/process_koc.pl

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


More information about the Koha-bugs mailing list