Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add fastcgi connect timeout log #7934

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions hphp/runtime/server/fastcgi/fastcgi-session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <folly/Memory.h>
Expand Down Expand Up @@ -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();
}

Expand Down