loolwsd/LOOLWSD.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) New commits: commit 38e3da41c833855711c8c02987fb2bbcf5ffbe03 Author: Henry Castro <hcas...@collabora.com> Date: Mon Jan 25 17:23:01 2016 -0400
loolwsd: Log::warn when the thread pool is full When thread pool is full no more connections are accepted. It is confused as a deadlock diff --git a/loolwsd/LOOLWSD.cpp b/loolwsd/LOOLWSD.cpp index 0440430..db2ccac 100644 --- a/loolwsd/LOOLWSD.cpp +++ b/loolwsd/LOOLWSD.cpp @@ -1384,8 +1384,19 @@ int LOOLWSD::main(const std::vector<std::string>& /*args*/) waitForTerminationRequest(); } + std::chrono::steady_clock::time_point lastPoolTime = std::chrono::steady_clock::now(); + while (!LOOLWSD::isShutDown && !LOOLWSD::doTest && MasterProcessSession::_childProcesses.size() > 0) { + const auto duration = (std::chrono::steady_clock::now() - lastPoolTime); + if (duration >= std::chrono::seconds(10)) + { + if (threadPool.available() == 0) + std::cout << Util::logPrefix() << "The thread pool is full, no more connections are accepted." << std::endl; + + lastPoolTime = std::chrono::steady_clock::now(); + } + pid_t pid = waitpid(-1, &status, WUNTRACED | WNOHANG); if (pid > 0) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits