diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2022-06-23 13:48:06 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 13:48:06 +0300 |
commit | 75f29fd4d623a0995e8e534982c5a9c3987bb5cd (patch) | |
tree | 35330e200e31b2d38b8b870e5a4b267232035b43 /daemon | |
parent | a878ed36431db17bebb53004200e41bb91e9248f (diff) |
Add configuration for dbengine page fetch timeout and retry count (#13194)
* Add configuration for page cache fetch timeout and retry count
Change page cache wait default timeout to 3 seconds
* Issue info message in the error.log if values not within expected lower range
* Fix compilation errors with --disable-dbengine
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/daemon/main.c b/daemon/main.c index 6a07add1c9..35f2c189e4 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -1231,6 +1231,20 @@ int main(int argc, char **argv) { // initialize the log files open_all_log_files(); +#ifdef ENABLE_DBENGINE + default_rrdeng_page_fetch_timeout = (int) config_get_number(CONFIG_SECTION_GLOBAL, "dbengine page fetch timeout", PAGE_CACHE_FETCH_WAIT_TIMEOUT); + if (default_rrdeng_page_fetch_timeout < 1) { + info("\"dbengine page fetch timeout\" found in netdata.conf cannot be %d, using 1", default_rrdeng_page_fetch_timeout); + default_rrdeng_page_fetch_timeout = 1; + } + + default_rrdeng_page_fetch_retries = (int) config_get_number(CONFIG_SECTION_GLOBAL, "dbengine page fetch retries", MAX_PAGE_CACHE_FETCH_RETRIES); + if (default_rrdeng_page_fetch_retries < 1) { + info("\"dbengine page fetch retries\" found in netdata.conf cannot be %d, using 1", default_rrdeng_page_fetch_retries); + default_rrdeng_page_fetch_retries = 1; + } +#endif + get_system_timezone(); // -------------------------------------------------------------------- // get the certificate and start security |