http_client_peer_pool_connection_success(
struct http_client_peer_pool *ppool)
{
- e_debug(ppool->event, "Successfully connected (connections=%u)",
- array_count(&ppool->conns));
+ e_debug(ppool->event, "Successfully connected "
+ "(%u connections exist, %u pending)",
+ array_count(&ppool->conns), array_count(&ppool->pending_conns));
http_client_peer_shared_connection_success(ppool->peer);
{
e_debug(ppool->event,
"Failed to make connection "
- "(connections=%u, connecting=%u)",
+ "(%u connections exist, %u pending)",
array_count(&ppool->conns), array_count(&ppool->pending_conns));
http_client_peer_shared_connection_failure(ppool->peer);
claimed_existing = TRUE;
e_debug(peer->event,
- "Claimed idle connection (connections=%u)",
- array_count(&peer->conns));
+ "Claimed idle connection "
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns),
+ array_count(&peer->pending_conns));
}
for (; i < count; i++) {
e_debug(peer->event,
- "Making new connection %u of %u", i+1, count);
+ "Making new connection %u of %u "
+ "(%u connections exist, %u pending)",
+ i+1, count, array_count(&peer->conns),
+ array_count(&peer->pending_conns));
+
(void)http_client_connection_create(peer);
}
}
e_debug(peer->event,
"Peer no longer used; will now cancel pending connections "
- "(%u connections exist)", array_count(&peer->conns));
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns),
+ array_count(&peer->pending_conns));
+
http_client_peer_cancel(peer);
return;
}
if (num_pending == 0) {
e_debug(peer->event,
"No requests to service for this peer "
- "(%u connections exist)", array_count(&peer->conns));
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns),
+ array_count(&peer->pending_conns));
http_client_peer_check_idle(peer);
return;
}
if (num_pending == 0) {
e_debug(peer->event,
"No more requests to service for this peer "
- "(%u connections exist)", array_count(&peer->conns));
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns),
+ array_count(&peer->pending_conns));
http_client_peer_check_idle(peer);
break;
}
}
/* still waiting for connections to finish */
- e_debug(peer->event, "No request handled; waiting for new connections");
+ e_debug(peer->event, "No request handled; "
+ "waiting for pending connections "
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns), connecting);
return;
}
struct http_client_peer_pool *ppool = peer->ppool;
struct http_client_queue *const *queue;
- e_debug(peer->event, "Successfully connected (connections=%u)",
- array_count(&peer->conns));
+ e_debug(peer->event, "Successfully connected "
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns), array_count(&peer->pending_conns));
http_client_peer_pool_connection_success(ppool);
{
struct http_client_peer_pool *ppool = peer->ppool;
- e_debug(peer->event, "Connection failed (connections=%u)",
- array_count(&peer->conns));
+ e_debug(peer->event, "Connection failed "
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns), array_count(&peer->pending_conns));
http_client_peer_pool_connection_failure(ppool, reason);
e_debug(peer->event,
"A connection succeeded within our peer pool, "
"so this peer can retry connecting as well if needed "
- "(%u connections exist)", array_count(&peer->conns));
+ "(%u connections exist, %u pending)",
+ array_count(&peer->conns), array_count(&peer->pending_conns));
/* if there are pending requests for this peer, try creating a new
connection for them. if not, this peer will wind itself down. */
struct http_client_queue *const *queue;
e_debug(peer->event,
- "Failed to establish any connection within our peer pool: %s ",
- reason);
+ "Failed to establish any connection within our peer pool: %s "
+ "(%u connections exist, %u pending)", reason,
+ array_count(&peer->conns), array_count(&peer->pending_conns));
peer->connect_failed = TRUE;
num_pending = http_client_peer_requests_pending(peer, &num_urgent);
e_debug(peer->event,
- "Lost a connection%s (%u queues linked, %u connections left, "
- "%u requests pending, %u requests urgent)",
+ "Lost a connection%s "
+ "(%u queues linked, %u connections left, "
+ "%u connections pending, %u requests pending, "
+ "%u requests urgent)",
(premature ? " prematurely" : ""),
array_count(&peer->queues), array_count(&peer->conns),
- num_pending, num_urgent);
+ array_count(&peer->pending_conns), num_pending, num_urgent);
if (peer->handling_requests) {
/* we got here from the request handler loop */