[Libreoffice-commits] online.git: common/Common.hpp wsd/LOOLWSD.cpp

Ashod Nakashian (via logerrit) logerrit at kemper.freedesktop.org
Mon Oct 28 09:47:04 UTC 2019


 common/Common.hpp |    4 ++--
 wsd/LOOLWSD.cpp   |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ecdd15d5a9e616eb93662305f61c3cb3dce062eb
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Sep 29 17:01:36 2019 -0400
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Mon Oct 28 10:46:44 2019 +0100

    wsd: allow longer timeout for child forking
    
    We need to give the child more time than we
    poll, so we would get a chance to register
    prespawned children before we account for
    any missing ones. Also, allowing only 5
    seconds risks spawning too many children
    on a slow, or somewhat loaded system.
    
    This raises the child timeout to twice
    the poll timeout, which is 5 seconds,
    allowing for 10 seconds for spawning.
    
    Change-Id: I4cc9e2fc656268fa82a935a5cb1626540bd49980
    Reviewed-on: https://gerrit.libreoffice.org/80322
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>
    (cherry picked from commit afb96fcbad4e36ef4eb07bf6d0b67329b714858e)
    Reviewed-on: https://gerrit.libreoffice.org/81560
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/common/Common.hpp b/common/Common.hpp
index f1ccc4c61..f35ca08f8 100644
--- a/common/Common.hpp
+++ b/common/Common.hpp
@@ -16,9 +16,9 @@
 constexpr int DEFAULT_CLIENT_PORT_NUMBER = 9980;
 
 constexpr int COMMAND_TIMEOUT_MS = 5000;
-constexpr long CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS;
+constexpr int CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS * 2;
 constexpr int CHILD_REBALANCE_INTERVAL_MS = CHILD_TIMEOUT_MS / 10;
-constexpr int POLL_TIMEOUT_MS = COMMAND_TIMEOUT_MS / 10;
+constexpr int POLL_TIMEOUT_MS = COMMAND_TIMEOUT_MS / 5;
 constexpr int WS_SEND_TIMEOUT_MS = 1000;
 
 constexpr int TILE_ROUNDTRIP_TIMEOUT_MS = 5000;
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 33c3b1955..ca0880812 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -3414,7 +3414,7 @@ int LOOLWSD::innerMain()
         }
         else
         {
-            const long timeoutMs = CHILD_TIMEOUT_MS * (LOOLWSD::NoCapsForKit ? 150 : 50);
+            const int timeoutMs = CHILD_TIMEOUT_MS * (LOOLWSD::NoCapsForKit ? 150 : 50);
             const auto timeout = std::chrono::milliseconds(timeoutMs);
             LOG_TRC("Waiting for a new child for a max of " << timeoutMs << " ms.");
             if (!NewChildrenCV.wait_for(lock, timeout, []() { return !NewChildren.empty(); }))


More information about the Libreoffice-commits mailing list