All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chaitanya Vadrevu" <chaitanya.vadrevu@ni.com>
To: <bitbake-devel@lists.openembedded.org>
Cc: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
Subject: [PATCH] process.py: Increase bitbake timeout and add logs
Date: Tue, 2 Mar 2021 15:51:34 -0600	[thread overview]
Message-ID: <20210302215134.11881-1-chaitanya.vadrevu@ni.com> (raw)

We have started seeing "Unable to connect to bitbake server ..." errors on
our build farm consistently with 60s timeout. Increasing the timeout to
300s and logging every 10s.

Signed-off-by: Chaitanya Vadrevu <chaitanya.vadrevu@ni.com>
---
 lib/bb/server/process.py | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/lib/bb/server/process.py b/lib/bb/server/process.py
index b27b4aef..d5571c36 100644
--- a/lib/bb/server/process.py
+++ b/lib/bb/server/process.py
@@ -390,12 +390,19 @@ class ServerCommunicator():
         self.connection = connection
         self.recv = recv
 
+        self.reply_wait = 10
+        self.max_reply_wait = 300
+
     def runCommand(self, command):
         self.connection.send(command)
-        if not self.recv.poll(30):
-            logger.info("No reply from server in 30s")
-            if not self.recv.poll(30):
-                raise ProcessTimeout("Timeout while waiting for a reply from the bitbake server (60s)")
+        total_reply_wait = self.reply_wait
+
+        while not self.recv.poll(self.reply_wait):
+            logger.info("No reply from server in %ds" % total_reply_wait)
+            total_reply_wait += self.reply_wait
+            if total_reply_wait > self.max_reply_wait:
+                raise ProcessTimeout("Timeout while waiting for a reply from the bitbake server (%ds)" % (total_reply_wait - self.reply_wait))
+
         ret, exc = self.recv.get()
         # Should probably turn all exceptions in exc back into exceptions?
         # For now, at least handle BBHandledException
-- 
2.17.1


             reply	other threads:[~2021-03-02 21:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 21:51 Chaitanya Vadrevu [this message]
2021-03-02 22:44 ` [bitbake-devel] [PATCH] process.py: Increase bitbake timeout and add logs Richard Purdie
2021-03-02 23:24   ` Chaitanya Vadrevu
     [not found]   ` <1668AA16CDA346BC.30035@lists.openembedded.org>
2021-03-15 17:05     ` Chaitanya Vadrevu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210302215134.11881-1-chaitanya.vadrevu@ni.com \
    --to=chaitanya.vadrevu@ni.com \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.