Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions common_mk/openssl_flags.mk
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ else
$(error Warning: OpenSSL libraries directory (SSL_LDIR) not found. Exiting. Please ensure the correct path is set or install OpenSSL version 3.)
endif
else
$(error Warning: OpenSSL headers (SSL_IDIR) not found. Exiting. Please install OpenSSL version 3.)
endif
$(error Warning: OpenSSL headers (SSL_IDIR) not found. Exiting. Please install OpenSSL version 3 and make sure pkg-config is present.)
endif
11 changes: 11 additions & 0 deletions lib/PgSQL_HostGroups_Manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1974,6 +1974,17 @@ PgSQL_SrvC *PgSQL_HGC::get_random_MySrvC(char * gtid_uuid, uint64_t gtid_trxid,
}
}
}
if (sum==0 && num_candidates > 0) {
proxy_info("No available server in hostgroup %u with weight > 0, but %u candidates found. This is probably due to max_connections reached for all servers. Using candidates with weight 0\n", hid, num_candidates);
// Iterate on all candidates and increase their weight
for (j=0; j<num_candidates; j++) {
mysrvc = mysrvcCandidates[j];
// increase the weight of the server
mysrvc->weight++;
proxy_debug("Increasing weight of server %s:%d to %ld\n", mysrvc->address, mysrvc->port, mysrvc->weight);
sum += 1;
}
}
if (sum==0) {
// per issue #531 , we try a desperate attempt to bring back online any shunned server
// we do this lowering the maximum wait time to 10%
Expand Down