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.
This commit is contained in:
Max Romanov
2021-10-28 17:46:54 +03:00
parent 803e037302
commit bba97134e9
24 changed files with 273 additions and 248 deletions

View File

@@ -485,14 +485,13 @@ nxt_php_start(nxt_task_t *task, nxt_process_data_t *data)
}
}
ret = nxt_unit_default_init(task, &php_init);
ret = nxt_unit_default_init(task, &php_init, conf);
if (nxt_slow_path(ret != NXT_OK)) {
nxt_alert(task, "nxt_unit_default_init() failed");
return ret;
}
php_init.callbacks.request_handler = nxt_php_request_handler;
php_init.shm_limit = conf->shm_limit;
unit_ctx = nxt_unit_init(&php_init);
if (nxt_slow_path(unit_ctx == NULL)) {