Bugzilla – Attachment 162942 Details for
Bug 33898
background_jobs_worker.pl may leave defunct children processes for extended periods of time
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33898: Alternative approach with receive frame timeout
Bug-33898-Alternative-approach-with-receive-frame-.patch (text/plain), 1.37 KB, created by
Marcel de Rooy
on 2024-03-08 07:38:42 UTC
(
hide
)
Description:
Bug 33898: Alternative approach with receive frame timeout
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-03-08 07:38:42 UTC
Size:
1.37 KB
patch
obsolete
>From 65aaf74a4f80e06b92817ac18a1084bb21e21a47 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 8 Mar 2024 07:37:19 +0000 >Subject: [PATCH] Bug 33898: Alternative approach with receive frame timeout >Content-Type: text/plain; charset=utf-8 > >See bug 33898 comment6. >--- > misc/workers/background_jobs_worker.pl | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/misc/workers/background_jobs_worker.pl b/misc/workers/background_jobs_worker.pl >index 823dbab15c..5b432ec11f 100755 >--- a/misc/workers/background_jobs_worker.pl >+++ b/misc/workers/background_jobs_worker.pl >@@ -73,6 +73,7 @@ my ( $help, @queues ); > my $max_processes = $ENV{MAX_PROCESSES}; > $max_processes ||= C4::Context->config('background_jobs_worker')->{max_processes} if C4::Context->config('background_jobs_worker'); > $max_processes ||= 1; >+my $mq_timeout = $ENV{MQ_TIMEOUT} // 10; > > my $not_found_retries = {}; > my $max_retries = $ENV{MAX_RETRIES} || 10; >@@ -114,9 +115,10 @@ if ( $conn ) { > } > while (1) { > if ( $conn ) { >- my $frame = $conn->receive_frame; >+ my $frame = $conn->receive_frame( { timeout => $mq_timeout } ); > if ( !defined $frame ) { >- # maybe log connection problems >+ # timeout or connection issue? >+ $pm->reap_finished_children; > next; # will reconnect automatically > } > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33898
:
151993
|
151994
|
151997
|
153194
|
162941
|
162942
|
162943
|
162944
|
162953
|
162954
|
163056
|
163057