Skip to content

Commit b07a6eb

Browse files
zengjinjimsaf1980
authored andcommitted
fix: only worker proccess can exec health check
when upstream server increases and nginx add proxy_cache command, 512 worker_connections are not enough may occur in error log. because helper process only have 512 connection
1 parent 5a67dc6 commit b07a6eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ngx_http_upstream_check_module.c

+4
Original file line numberDiff line numberDiff line change
@@ -4579,6 +4579,10 @@ ngx_http_upstream_check_init_process(ngx_cycle_t *cycle)
45794579
{
45804580
ngx_http_upstream_check_main_conf_t *ucmcf;
45814581

4582+
if (ngx_process != NGX_PROCESS_WORKER) {
4583+
return NGX_OK;
4584+
}
4585+
45824586
ucmcf = ngx_http_cycle_get_module_main_conf(cycle, ngx_http_upstream_check_module);
45834587
if (ucmcf == NULL) {
45844588
return NGX_OK;

0 commit comments

Comments
 (0)