Add max connection info while waiting one backend connection failed

This commit is contained in:
wangbin 2023-04-25 20:26:18 +08:00
parent 1f8a3a5243
commit 452e00d2df
2 changed files with 15 additions and 12 deletions

View File

@ -355,7 +355,8 @@ network_read_sql_resp(int G_GNUC_UNUSED fd, short events, void *user_data)
packet.data = chunk->data;
packet.offset = 0;
int is_finished = network_mysqld_proto_get_query_result(&packet, con);
int is_finished =
network_mysqld_proto_get_query_result(&packet, con);
if (is_finished == 1) {
g_debug("%s: read finished", G_STRLOC);
break;

View File

@ -2585,8 +2585,10 @@ handle_read_query(network_mysqld_con *con, network_mysqld_con_state_t ostate)
}
/* fall through */
default:
g_critical("%s: wait failed and no server backend for user:%s, ret:%d",
G_STRLOC, con->client->response->username->str, ret);
g_critical("%s: wait failed and no server backend for user:%s, ret:%d, "
"max conn:%d",
G_STRLOC, con->client->response->username->str, ret,
con->srv->max_idle_connections);
handle_query_wait_stats(con);
process_service_unavailable(con);