Skip to contentSkip to conversation

bitbake: server/xmlrpc/prserv: Increase timeout to default xmlrpc server

PATCH In review Peter A. Bigot 3 participants 6 messages Aug 28, 2013 – Aug 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bitbake: server/xmlrpc/prserv: Increase timeout to default xmlrpc server

On a heavily-loaded host with local PR server the default 5 second timeout produces too-frequent errors:

ERROR: Can NOT get PRAUTO, exception timed out
ERROR: Function failed: package_get_auto_pr

Since this error aborts the build a generous timeout seems appropriate.

---
 lib/bb/server/xmlrpc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/server/xmlrpc.py +1 -1
index 4dee5d9..bb87fd7 100644
@@ -78,7 +78,7 @@ class BBTransport(xmlrpclib.Transport):
             h.putheader("Bitbake-token", self.connection_token)
         xmlrpclib.Transport.send_content(self, h, body)
 
-def _create_server(host, port, timeout = 5):
+def _create_server(host, port, timeout = 20):
     t = BBTransport(timeout)
     s = xmlrpclib.Server("http://%s:%d/" % (host, port), transport=t, allow_none=True)
     return s, t
Signature · 1 line
1.8.4
#1 lore raw
Quoted 18 lines · Peter A. Bigot

On a heavily-loaded host with local PR server the default 5 second timeout produces too-frequent errors:

ERROR: Can NOT get PRAUTO, exception timed out
ERROR: Function failed: package_get_auto_pr

Since this error aborts the build a generous timeout seems appropriate.

---
 lib/bb/server/xmlrpc.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/server/xmlrpc.py +0 -0
index 4dee5d9..bb87fd7 100644

lib/bb/server/xmlrpc.py class BBTransport(xmlrpclib.Transport): · line 84

Quoted 8 lines
lib/bb/server/xmlrpc.py +1 -1
@@ -78,7 +78,7 @@ class BBTransport(xmlrpclib.Transport):
             h.putheader("Bitbake-token", self.connection_token)
         xmlrpclib.Transport.send_content(self, h, body)
 
-def _create_server(host, port, timeout = 5):
+def _create_server(host, port, timeout = 20):
     t = BBTransport(timeout)
     s = xmlrpclib.Server("http://%s:%d/" % (host, port), transport=t, allow_none=True)
     return s, t

I would go so far as to make this 60 seconds and or have it a configurable parameter.

Previously the timeout was infinite. I have observed process creation lagging by 30-45 seconds on a server with a load average of +300. The new bitbake python code with the reduced timeout is not yet running on our edge case testing environment, but I do expect to hit the same issue.

Jason.

#2 lore raw
Quoted 30 lines · Jason Wessel
Quoted 18 lines · Peter A. Bigot

On a heavily-loaded host with local PR server the default 5 second timeout produces too-frequent errors:

ERROR: Can NOT get PRAUTO, exception timed out
ERROR: Function failed: package_get_auto_pr

Since this error aborts the build a generous timeout seems appropriate.

---
  lib/bb/server/xmlrpc.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/server/xmlrpc.py +0 -0
index 4dee5d9..bb87fd7 100644

lib/bb/server/xmlrpc.py class BBTransport(xmlrpclib.Transport): · line 84

Quoted 8 lines
lib/bb/server/xmlrpc.py +1 -1
@@ -78,7 +78,7 @@ class BBTransport(xmlrpclib.Transport):
              h.putheader("Bitbake-token", self.connection_token)
          xmlrpclib.Transport.send_content(self, h, body)
 
-def _create_server(host, port, timeout = 5):
+def _create_server(host, port, timeout = 20):
      t = BBTransport(timeout)
      s = xmlrpclib.Server("http://%s:%d/" % (host, port), transport=t, allow_none=True)
      return s, t

I would go so far as to make this 60 seconds and or have it a configurable parameter.

Quoted 1 line

Previously the timeout was infinite. I have observed process creation lagging by 30-45 seconds on a server with a load average of +300. The new bitbake python code with the reduced timeout is not yet running on our edge case testing environment, but I do expect to hit the same issue.

Not sure when the timeout was added, but I believe it was before the modifications in the last few days that moved it to this function; I've been having this problem since switching to poky master.

60 seconds would be fine with me; I could update the patch for that. A configurable parameter would be better but it wasn't obvious how to do it, so if people prefer that approach I'd rather a bitbake maintainer take over from here.

Peter

#3 lore raw
Quoted 33 lines · Peter A. Bigot
Quoted 30 lines · Jason Wessel
Quoted 18 lines · Peter A. Bigot

On a heavily-loaded host with local PR server the default 5 second timeout produces too-frequent errors:

ERROR: Can NOT get PRAUTO, exception timed out
ERROR: Function failed: package_get_auto_pr

Since this error aborts the build a generous timeout seems appropriate.

---
  lib/bb/server/xmlrpc.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/server/xmlrpc.py +0 -0
index 4dee5d9..bb87fd7 100644

lib/bb/server/xmlrpc.py class BBTransport(xmlrpclib.Transport): · line 84

Quoted 8 lines
lib/bb/server/xmlrpc.py +1 -1
@@ -78,7 +78,7 @@ class BBTransport(xmlrpclib.Transport):
              h.putheader("Bitbake-token", self.connection_token)
          xmlrpclib.Transport.send_content(self, h, body)
 
-def _create_server(host, port, timeout = 5):
+def _create_server(host, port, timeout = 20):
      t = BBTransport(timeout)
      s = xmlrpclib.Server("http://%s:%d/" % (host, port), transport=t, allow_none=True)
      return s, t

I would go so far as to make this 60 seconds and or have it a configurable parameter.

Quoted 1 line

Previously the timeout was infinite. I have observed process creation lagging by 30-45 seconds on a server with a load average of +300. The new bitbake python code with the reduced timeout is not yet running on our edge case testing environment, but I do expect to hit the same issue.

Quoted 8 lines

Not sure when the timeout was added, but I believe it was before the modifications in the last few days that moved it to this function; I've been having this problem since switching to poky master.

60 seconds would be fine with me; I could update the patch for that. A configurable parameter would be better but it wasn't obvious how to do it, so if people prefer that approach I'd rather a bitbake maintainer take over from here.

The downside is that if something goes wrong this ends up leaving bitbake hanging for 60 seconds at exit whilst it tries to connect to a server which is never going to exist. I'm rather frustrated that the PR service is so slow since this will block the packaging process for that length or time.

With that in mind I've radically improved the performance of the server with threading. Can people retest with master and see how things behave now?

Cheers,

Richard

#4 lore raw
Quoted 46 lines · Richard Purdie
Quoted 31 lines · Peter A. Bigot
Quoted 22 lines · Jason Wessel
Quoted 21 lines · Peter A. Bigot

On a heavily-loaded host with local PR server the default 5 second timeout produces too-frequent errors:

ERROR: Can NOT get PRAUTO, exception timed out
ERROR: Function failed: package_get_auto_pr

Since this error aborts the build a generous timeout seems appropriate.

---
   lib/bb/server/xmlrpc.py | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/server/xmlrpc.py +0 -0
index 4dee5d9..bb87fd7 100644
@@ -78,7 +78,7 @@ class BBTransport(xmlrpclib.Transport):
               h.putheader("Bitbake-token", self.connection_token)
           xmlrpclib.Transport.send_content(self, h, body)
 
Quoted 8 lines

lib/bb/server/xmlrpc.py class BBTransport(xmlrpclib.Transport): · line 84

Quoted 5 lines
lib/bb/server/xmlrpc.py +1 -1
-def _create_server(host, port, timeout = 5):
+def _create_server(host, port, timeout = 20):
       t = BBTransport(timeout)
       s = xmlrpclib.Server("http://%s:%d/" % (host, port), transport=t, allow_none=True)
       return s, t

I would go so far as to make this 60 seconds and or have it a configurable parameter.

Previously the timeout was infinite. I have observed process creation lagging by 30-45 seconds on a server with a load average of +300. The new bitbake python code with the reduced timeout is not yet running on our edge case testing environment, but I do expect to hit the same issue.

Quoted 8 lines

Not sure when the timeout was added, but I believe it was before the modifications in the last few days that moved it to this function; I've been having this problem since switching to poky master.

60 seconds would be fine with me; I could update the patch for that. A configurable parameter would be better but it wasn't obvious how to do it, so if people prefer that approach I'd rather a bitbake maintainer take over from here.

The downside is that if something goes wrong this ends up leaving bitbake hanging for 60 seconds at exit whilst it tries to connect to a server which is never going to exist. I'm rather frustrated that the PR service is so slow since this will block the packaging process for that length or time.

Quoted 3 lines

With that in mind I've radically improved the performance of the server with threading. Can people retest with master and see how things behave now?

I rebased my poky to include current master which has your multithreaded PR server patches from 28 Aug, dropped my patch, and started a from-scratch build involving 5971 tasks. It aborted twice with:

ERROR: Can NOT get PRAUTO, exception timed out
ERROR: Function failed: package_get_auto_pr

before it got through the first 1500 tasks. I put my patch back and it ran through the remaining 4400+ tasks without error.

The threading makes sense for a shared PR server serving multiple remote clients, but it's not enough for a localhost server that's heavily loaded with other work.

Peter

#5 lore raw
In reply to Richard Purdie
Quoted 49 lines · Richard Purdie
Quoted 33 lines · Peter A. Bigot
Quoted 30 lines · Jason Wessel
Quoted 18 lines · Peter A. Bigot

On a heavily-loaded host with local PR server the default 5 second timeout produces too-frequent errors:

ERROR: Can NOT get PRAUTO, exception timed out
ERROR: Function failed: package_get_auto_pr

Since this error aborts the build a generous timeout seems appropriate.

---
  lib/bb/server/xmlrpc.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/server/xmlrpc.py +0 -0
index 4dee5d9..bb87fd7 100644

lib/bb/server/xmlrpc.py class BBTransport(xmlrpclib.Transport): · line 84

Quoted 8 lines
lib/bb/server/xmlrpc.py +1 -1
@@ -78,7 +78,7 @@ class BBTransport(xmlrpclib.Transport):
              h.putheader("Bitbake-token", self.connection_token)
          xmlrpclib.Transport.send_content(self, h, body)
 
-def _create_server(host, port, timeout = 5):
+def _create_server(host, port, timeout = 20):
      t = BBTransport(timeout)
      s = xmlrpclib.Server("http://%s:%d/" % (host, port), transport=t, allow_none=True)
      return s, t

I would go so far as to make this 60 seconds and or have it a configurable parameter.

Quoted 1 line

Previously the timeout was infinite. I have observed process creation lagging by 30-45 seconds on a server with a load average of +300. The new bitbake python code with the reduced timeout is not yet running on our edge case testing environment, but I do expect to hit the same issue.

Quoted 8 lines

Not sure when the timeout was added, but I believe it was before the modifications in the last few days that moved it to this function; I've been having this problem since switching to poky master.

60 seconds would be fine with me; I could update the patch for that. A configurable parameter would be better but it wasn't obvious how to do it, so if people prefer that approach I'd rather a bitbake maintainer take over from here.

The downside is that if something goes wrong this ends up leaving bitbake hanging for 60 seconds at exit whilst it tries to connect to a server which is never going to exist. I'm rather frustrated that the PR service is so slow since this will block the packaging process for that length or time.

Quoted 3 lines

With that in mind I've radically improved the performance of the server with threading. Can people retest with master and see how things behave now?

Looking at the number of people hitting this, I've set it to 60s.

Cheers,

Richard