From f1aff3355dff0cc004f4b3c65e57080cd82559ad Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rados=C5=82aw=20Korzeniewski?= Date: Wed, 9 Dec 2020 16:31:38 +0100 Subject: [PATCH] ptcomm: Correct and increase default bpipe timeout. --- bacula/src/plugins/fd/pluginlib/ptcomm.cpp | 4 ++-- bacula/src/plugins/fd/pluginlib/ptcomm.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bacula/src/plugins/fd/pluginlib/ptcomm.cpp b/bacula/src/plugins/fd/pluginlib/ptcomm.cpp index b2094fe79..7e5f4ecd3 100644 --- a/bacula/src/plugins/fd/pluginlib/ptcomm.cpp +++ b/bacula/src/plugins/fd/pluginlib/ptcomm.cpp @@ -145,8 +145,8 @@ bool PTCOMM::recvbackend_data(bpContext *ctx, char *buf, int32_t nbytes) { // this means timeout waiting f_error = true; - DMSG1(ctx, DERROR, "BPIPE read timeout=%d.\n", _timeout.tv_sec); - JMSG1(ctx, is_fatal() ? M_FATAL : M_ERROR, "BPIPE read timeout=%d.\n", _timeout.tv_sec); + DMSG1(ctx, DERROR, "BPIPE read timeout=%d.\n", PTCOMM_DEFAULT_TIMEOUT); + JMSG1(ctx, is_fatal() ? M_FATAL : M_ERROR, "BPIPE read timeout=%d.\n", PTCOMM_DEFAULT_TIMEOUT); return false; } diff --git a/bacula/src/plugins/fd/pluginlib/ptcomm.h b/bacula/src/plugins/fd/pluginlib/ptcomm.h index 2f7260fbe..4a4e18276 100644 --- a/bacula/src/plugins/fd/pluginlib/ptcomm.h +++ b/bacula/src/plugins/fd/pluginlib/ptcomm.h @@ -24,7 +24,8 @@ #include "pluginlib.h" -#define PTCOMM_DEFAULT_TIMEOUT 300 // timeout waiting for data 15 min, it should be enough +#define PTCOMM_DEFAULT_TIMEOUT 3600 // timeout waiting for data is 1H as some backends could spent it doing real work + // TODO: I think we should move it to plugin configurable variable instead of a const /* * The protocol packet header. -- 2.47.3