From a83921dca749e4c30afb5435c3bde5bbf7021cad Mon Sep 17 00:00:00 2001 From: Rahim Kanji Date: Fri, 5 May 2023 16:12:40 +0500 Subject: [PATCH] * Updated DNS Cache warning message. * Few tweaks --- lib/MySQL_Monitor.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 0fb01f666..f137d78b5 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -4623,8 +4623,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(mysql_thread___monitor_local_dns_resolver_queue_maxsize) / 8) { - proxy_warning("DNS resolver queue too big: %d\n", qsize); + if (qsize > (static_cast(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; @@ -4665,16 +4665,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(mysql_thread___monitor_local_dns_resolver_queue_maxsize) / 8) { - proxy_warning("DNS resolver queue too big: %d\n", qsize); + if (qsize > (static_cast(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) {