From 6fc7c949ea838ef96efa4e54140b804b6c231da4 Mon Sep 17 00:00:00 2001 From: lxnay Date: Mon, 3 Nov 2008 22:48:43 +0000 Subject: [PATCH] Entropy/SocketHostInterface: - reduce the forked requests timeout to 15 (from 300) seconds - export the setting to etpConst git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2636 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropy.py | 9 ++++++++- libraries/entropyConstants.py | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libraries/entropy.py b/libraries/entropy.py index 63ec49d2e..1950c36ae 100644 --- a/libraries/entropy.py +++ b/libraries/entropy.py @@ -13699,6 +13699,13 @@ class SocketHostInterface: if passed_away: break if dead or (seconds > my_timeout): + self.server.processor.HostInterface.updateProgress( + 'interrupted: forked request timeout: %s,%s from client: %s' % ( + seconds, + dead, + self.client_address, + ) + ) if not dead: import signal os.kill(pid,signal.SIGKILL) @@ -14664,7 +14671,7 @@ class SocketHostInterface: # settings self.SessionsLock = self.threading.Lock() self.fork_requests = True # used by the command processor - self.fork_request_timeout_seconds = 300 + self.fork_request_timeout_seconds = etpConst['socket_service']['forked_requests_timeout'] self.stdout_logging = True self.timeout = etpConst['socket_service']['timeout'] self.hostname = etpConst['socket_service']['hostname'] diff --git a/libraries/entropyConstants.py b/libraries/entropyConstants.py index 5ebd18dd4..91b8af2fb 100644 --- a/libraries/entropyConstants.py +++ b/libraries/entropyConstants.py @@ -798,6 +798,7 @@ def const_defaultSettings(rootdir): 'port': 1026, 'ssl_port': 1027, # above + 1 'timeout': 200, + 'forked_requests_timeout': 10, 'threads': 5, 'session_ttl': 15, 'default_uid': 0,