nghttpx: Disable acceptor temporarily when process runs out of fd

This commit is contained in:
Tatsuhiro Tsujikawa 2015-03-10 21:23:21 +09:00
parent 8483225839
commit 6b714030dd
1 changed files with 6 additions and 0 deletions

View File

@ -81,6 +81,12 @@ void AcceptHandler::accept_connection() {
case EOPNOTSUPP: case EOPNOTSUPP:
case ENETUNREACH: case ENETUNREACH:
continue; continue;
case EMFILE:
case ENFILE:
LOG(WARN) << "acceptor: running out file descriptor; disable acceptor "
"temporarily";
conn_hnr_->disable_acceptor_temporary(30.);
break;
} }
break; break;