nghttpx: Log backend connection failure in WARN level
This commit is contained in:
parent
30f9f9ef87
commit
41b2745dad
|
@ -1807,10 +1807,8 @@ int Http2Session::write_noop() { return 0; }
|
||||||
|
|
||||||
int Http2Session::connected() {
|
int Http2Session::connected() {
|
||||||
if (!util::check_socket_connected(conn_.fd)) {
|
if (!util::check_socket_connected(conn_.fd)) {
|
||||||
if (LOG_ENABLED(INFO)) {
|
SSLOG(WARN, this) << "Backend connect failed; addr="
|
||||||
SSLOG(INFO, this) << "Backend connect failed; addr="
|
<< util::to_numeric_addr(&addr_->addr);
|
||||||
<< util::to_numeric_addr(&addr_->addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
downstream_failure(addr_);
|
downstream_failure(addr_);
|
||||||
|
|
||||||
|
@ -2212,6 +2210,9 @@ void Http2Session::on_timeout() {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CONNECTING: {
|
case CONNECTING: {
|
||||||
|
SSLOG(WARN, this) << "Connect time out; addr="
|
||||||
|
<< util::to_numeric_addr(&addr_->addr);
|
||||||
|
|
||||||
downstream_failure(addr_);
|
downstream_failure(addr_);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,12 +70,12 @@ namespace {
|
||||||
void connect_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) {
|
void connect_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) {
|
||||||
auto conn = static_cast<Connection *>(w->data);
|
auto conn = static_cast<Connection *>(w->data);
|
||||||
auto dconn = static_cast<HttpDownstreamConnection *>(conn->data);
|
auto dconn = static_cast<HttpDownstreamConnection *>(conn->data);
|
||||||
|
auto addr = dconn->get_addr();
|
||||||
|
|
||||||
if (LOG_ENABLED(INFO)) {
|
DCLOG(WARN, dconn) << "Connect time out; addr="
|
||||||
DCLOG(INFO, dconn) << "Connect time out";
|
<< util::to_numeric_addr(&addr->addr);
|
||||||
}
|
|
||||||
|
|
||||||
downstream_failure(dconn->get_addr());
|
downstream_failure(addr);
|
||||||
|
|
||||||
auto downstream = dconn->get_downstream();
|
auto downstream = dconn->get_downstream();
|
||||||
auto upstream = downstream->get_upstream();
|
auto upstream = downstream->get_upstream();
|
||||||
|
@ -1144,10 +1144,8 @@ int HttpDownstreamConnection::connected() {
|
||||||
if (!util::check_socket_connected(conn_.fd)) {
|
if (!util::check_socket_connected(conn_.fd)) {
|
||||||
conn_.wlimit.stopw();
|
conn_.wlimit.stopw();
|
||||||
|
|
||||||
if (LOG_ENABLED(INFO)) {
|
DCLOG(WARN, this) << "Backend connect failed; addr="
|
||||||
DCLOG(INFO, this) << "Backend connect failed; addr="
|
<< util::to_numeric_addr(&addr_->addr);
|
||||||
<< util::to_numeric_addr(&addr_->addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
downstream_failure(addr_);
|
downstream_failure(addr_);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue