diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2024-05-02 07:55:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 07:55:11 +0300 |
commit | 6678fc3197fa66dd4d574474055732602f46254f (patch) | |
tree | abbed3f49136531659e75e52a294483e8df79c16 | |
parent | 076d61f46e6f40e627f6f97b056f627d9ace54a3 (diff) |
Increase the message size to the spawn server (#17566)
* Spawn server check
* Increase message buffer
-rw-r--r-- | src/daemon/commands.h | 2 | ||||
-rw-r--r-- | src/daemon/main.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/daemon/commands.h b/src/daemon/commands.h index 45a76110ca..45125cf288 100644 --- a/src/daemon/commands.h +++ b/src/daemon/commands.h @@ -3,7 +3,7 @@ #ifndef NETDATA_COMMANDS_H #define NETDATA_COMMANDS_H 1 -#define MAX_COMMAND_LENGTH 4096 +#define MAX_COMMAND_LENGTH (8192) #define MAX_EXIT_STATUS_LENGTH 23 /* Can't ever be bigger than "X-18446744073709551616" */ typedef enum cmd { diff --git a/src/daemon/main.c b/src/daemon/main.c index 6aa13adf65..cb91b9bb84 100644 --- a/src/daemon/main.c +++ b/src/daemon/main.c @@ -23,6 +23,7 @@ int libuv_worker_threads = MIN_LIBUV_WORKER_THREADS; bool ieee754_doubles = false; time_t netdata_start_time = 0; struct netdata_static_thread *static_threads; +bool i_am_the_spawn_server = false; struct config netdata_config = { .first_section = NULL, @@ -303,6 +304,9 @@ static bool service_wait_exit(SERVICE_TYPE service, usec_t timeout_ut) { void web_client_cache_destroy(void); void netdata_cleanup_and_exit(int ret, const char *action, const char *action_result, const char *action_data) { + if (i_am_the_spawn_server) + exit(ret); + watcher_shutdown_begin(); nd_log_limits_unlimited(); @@ -1420,6 +1424,7 @@ int main(int argc, char **argv) { if (argc > 1 && strcmp(argv[1], SPAWN_SERVER_COMMAND_LINE_ARGUMENT) == 0) { // don't run netdata, this is the spawn server + i_am_the_spawn_server = true; spawn_server(); exit(0); } |