[Koha-bugs] [Bug 35111] Background jobs worker crashes on SIGPIPE when database connection lost
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Oct 20 01:32:34 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35111
--- Comment #1 from David Cook <dcook at prosentient.com.au> ---
The reason it gets stuck is that '$conn->ack( { frame => $frame } );' is run
and then 'my $job = Koha::BackgroundJobs->find($args->{job_id});' is run after
it.
So RabbitMQ thinks the message has been processed.
But we've lost the database connection, so Koha::BackgroundJobs->find()
generates a SIGPIPE signal, the process crashes, and daemon starts a new one.
The background job we were about to start is now stuck.
--
This is easy to avoid. We just need to ignore the SIGPIPE and then the
background_jobs_worker.pl will ignore the SIGPIPE, reconnect to the database,
and process the background job correctly.
I suspect this will fix a lot of people's problems with background tasks...
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list