summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_main_process.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2021-10-28 17:46:54 +0300
committerMax Romanov <max.romanov@nginx.com>2021-10-28 17:46:54 +0300
commitbba97134e983541e94cf73e93900729e3a3e61fc (patch)
treece0322c432f1d08cd302209f1403fab112788b2c /src/nxt_main_process.c
parent803e0373029a80994a85781d0b73b6cfa95bcf5a (diff)
downloadunit-bba97134e983541e94cf73e93900729e3a3e61fc.tar.gz
unit-bba97134e983541e94cf73e93900729e3a3e61fc.tar.bz2
Moving request limit control to libunit.
Introducting application graceful stop. For now only used when application process reach request limit value. This closes #585 issue on GitHub.
Diffstat (limited to '')
-rw-r--r--src/nxt_main_process.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nxt_main_process.c b/src/nxt_main_process.c
index 86425dab..fe21aeb5 100644
--- a/src/nxt_main_process.c
+++ b/src/nxt_main_process.c
@@ -154,6 +154,12 @@ static nxt_conf_map_t nxt_common_app_limits_conf[] = {
offsetof(nxt_common_app_conf_t, shm_limit),
},
+ {
+ nxt_string("requests"),
+ NXT_CONF_MAP_INT32,
+ offsetof(nxt_common_app_conf_t, request_limit),
+ },
+
};
@@ -392,6 +398,7 @@ nxt_port_main_start_process_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
*p = '\0';
app_conf->shm_limit = 100 * 1024 * 1024;
+ app_conf->request_limit = 0;
start += app_conf->name.length + 1;