From 932dbb5df0d4c470715e12c7fc7dfbaabe98843c Mon Sep 17 00:00:00 2001 From: huzhiguang Date: Thu, 27 Jul 2017 20:22:01 +0800 Subject: [PATCH] add fastcgi connect timeout log --- hphp/runtime/server/fastcgi/fastcgi-session.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hphp/runtime/server/fastcgi/fastcgi-session.cpp b/hphp/runtime/server/fastcgi/fastcgi-session.cpp index e45d8d76e9b496..9e451908a2c823 100644 --- a/hphp/runtime/server/fastcgi/fastcgi-session.cpp +++ b/hphp/runtime/server/fastcgi/fastcgi-session.cpp @@ -16,6 +16,7 @@ #include "hphp/runtime/server/fastcgi/fastcgi-session.h" #include "hphp/runtime/server/fastcgi/fastcgi-server.h" +#include "hphp/runtime/base/runtime-option.h" #include "hphp/util/logger.h" #include @@ -184,6 +185,10 @@ FastCGISession::FastCGISession( void FastCGISession::timeoutExpired() noexcept { // Hard shutdown; socket timed out + int timeout = RuntimeOption::ConnectionTimeoutSeconds; + // default 2 minutes FastCGIServer::FastCGIServer + if(timeout <= 0) timeout = 120; + Logger::Info("Fastcgi connection: connection time took longer than %d s and timeout, it will be shutdown!", timeout); dropConnection(); }