[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - wsd/DocumentBroker.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Thu Oct 10 12:26:54 UTC 2019
wsd/DocumentBroker.cpp | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 77818fbf2d5a0923cb8271e3f3c05fa797a583a9
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Thu Sep 19 23:42:13 2019 -0400
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Oct 10 14:26:35 2019 +0200
wsd: log before killing slow-loading docs
Change-Id: I85f045d1431feb51cb9ad093833c32a39ac38215
Reviewed-on: https://gerrit.libreoffice.org/79331
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index dae6da707..5e89ee736 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -267,8 +267,8 @@ void DocumentBroker::pollThread()
uint64_t adminRecv = 0;
auto lastBWUpdateTime = 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();
@@ -284,7 +284,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