wsd/DocumentBroker.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit 77818fbf2d5a0923cb8271e3f3c05fa797a583a9 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Thu Sep 19 23:42:13 2019 -0400 Commit: Jan Holesovsky <ke...@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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits