wsd/DocumentBroker.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
New commits: commit fd5581e7a314d343e628315d054aaaf5efd9795c Author: Ashod Nakashian <[email protected]> AuthorDate: Thu Sep 19 23:42:13 2019 -0400 Commit: Ashod Nakashian <[email protected]> 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 <[email protected]> Tested-by: Ashod Nakashian <[email protected]> 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; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
