Merge pull request #4209 from sysown/v2.x_dns_cache_update_message

Updated DNS Cache warning message.
pull/4213/head
René Cannaò 3 years ago committed by GitHub
commit 3dcc531dbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4627,8 +4627,8 @@ void* MySQL_Monitor::monitor_dns_cache() {
unsigned int qsize = dns_resolver_queue.size();
unsigned int num_threads = dns_resolver_threads.size();
if (qsize > static_cast<unsigned int>(mysql_thread___monitor_local_dns_resolver_queue_maxsize) / 8) {
proxy_warning("DNS resolver queue too big: %d\n", qsize);
if (qsize > (static_cast<unsigned int>(mysql_thread___monitor_local_dns_resolver_queue_maxsize) / 8)) {
proxy_warning("DNS resolver queue too big: %d. Please refer to https://proxysql.com/documentation/dns-cache/ for further information.\n", qsize);
unsigned int threads_max = num_dns_resolver_max_threads;
@ -4669,16 +4669,16 @@ void* MySQL_Monitor::monitor_dns_cache() {
unsigned int qsize = dns_resolver_queue.size();
unsigned int num_threads = dns_resolver_threads.size();
if (qsize > static_cast<unsigned int>(mysql_thread___monitor_local_dns_resolver_queue_maxsize) / 8) {
proxy_warning("DNS resolver queue too big: %d\n", qsize);
if (qsize > (static_cast<unsigned int>(mysql_thread___monitor_local_dns_resolver_queue_maxsize) / 4)) {
proxy_warning("DNS resolver queue too big: %d. Please refer to https://proxysql.com/documentation/dns-cache/ for further information.\n", qsize);
unsigned int threads_max = num_dns_resolver_max_threads;
if (threads_max > num_threads) {
unsigned int new_threads = threads_max - num_threads;
if ((qsize / 8) < new_threads) {
new_threads = qsize / 8; // try to not burst threads
if ((qsize / 4) < new_threads) {
new_threads = qsize / 4; // try to not burst threads
}
if (new_threads) {

Loading…
Cancel
Save