]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
ptcomm: Correct and increase default bpipe timeout.
authorRadosław Korzeniewski <radoslaw@korzeniewski.net>
Wed, 9 Dec 2020 15:31:38 +0000 (16:31 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:02:59 +0000 (09:02 +0100)
bacula/src/plugins/fd/pluginlib/ptcomm.cpp
bacula/src/plugins/fd/pluginlib/ptcomm.h

index b2094fe7932a4f53edc61a204bba91e25401d05e..7e5f4ecd3a3d7c952ee9d3aea06059358eeed1e6 100644 (file)
@@ -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;
       }
 
index 2f7260fbe41d0d0329b6f3f3ddcd989cfdb45aef..4a4e182760c963d7855a7ffc8cfd6a014df66fe8 100644 (file)
@@ -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.