https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30172
Bug ID: 30172
Summary: BackGround jobs failing due to race condition
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]
We are receiving reports from production of background jobs that show as 'new'
in the database that are not being processed.
There are no errors or exceptions relating to enqueueing from the broker
We do see in the worker-output.log:
Can't call method "process" on an undefined value at
/usr/share/koha/bin/background_jobs_worker.pl line 80.
In Koha/BackGroundJob.pm:
94 sub enqueue {
...
104 $self->_result->result_source->schema->txn_do(
105 sub {
106 $self->set(
107 {
108 status => 'new',
...
114 }
115 )->store;
...
121 try {
122 my $conn = $self->connect;
...
128 $conn->send_with_receipt( { destination =>
sprintf("/queue/%s-%s", $namespace, $job_type), body => $json_args } )
129 or Koha::Exceptions::Exception->throw('Job has not been
enqueued');
130 } catch {
...
138 );
^^End of transaction
What appears to be happening is that:
1 - The transaction is begun
2 - Job info is stored internally, but not committed
3 - the job is being sent to Rabbit
4 - Rabbit attempts to process the job, and fails as it cannot find the data in
the DB
3 - The transaction completes
We are left with jobs sitting at 'new' with no errors and they are never
processed
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/