[Libreoffice-commits] online.git: wsd/DocumentBroker.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 22 18:20:00 UTC 2019
wsd/DocumentBroker.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit fd5581e7a314d343e628315d054aaaf5efd9795c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Thu Sep 19 23:42:13 2019 -0400
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Sun Sep 22 20:19:41 2019 +0200
wsd: log before killing slow-loading docs
Change-Id: I85f045d1431feb51cb9ad093833c32a39ac38215
Reviewed-on: https://gerrit.libreoffice.org/79325
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index dffe5ea7f..ab71fe5ba 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -277,8 +277,8 @@ void DocumentBroker::pollThread()
auto lastBWUpdateTime = std::chrono::steady_clock::now();
auto lastClipboardHashUpdateTime = std::chrono::steady_clock::now();
- int limit_load_secs = LOOLWSD::getConfigValue<int>("per_document.limit_load_secs", 100);
- auto loadDeadline = std::chrono::steady_clock::now() + std::chrono::seconds(limit_load_secs);
+ const int limit_load_secs = LOOLWSD::getConfigValue<int>("per_document.limit_load_secs", 100);
+ const auto loadDeadline = std::chrono::steady_clock::now() + std::chrono::seconds(limit_load_secs);
#endif
auto last30SecCheckTime = std::chrono::steady_clock::now();
@@ -294,7 +294,14 @@ void DocumentBroker::pollThread()
{
// Brutal but effective.
if (_childProcess)
+ {
+ LOG_WRN("Doc [" << _docKey << "] is taking too long to load. Will kill process ["
+ << _childProcess->getPid()
+ << "]. per_document.limit_load_secs set to " << limit_load_secs
+ << " secs.");
_childProcess->terminate();
+ }
+
stop("Load timed out");
continue;
}
More information about the Libreoffice-commits
mailing list