Browse Source

[core] restart dead proc on connect error if local

restart dead proc on connect error only if proc started by lighttpd
Glenn Strauss 1 month ago
parent
commit
adf3c99568
  1. 8
      src/gw_backend.c

8
src/gw_backend.c

@ -2117,9 +2117,11 @@ static handler_t gw_write_error(gw_handler_ctx * const hctx, request_st * const
/* (optimization to detect backend process exit while processing a
* large number of ready events; (this block could be removed)) */
server * const srv = r->con->srv;
if (0 == srv->srvconf.max_worker)
gw_restart_dead_procs(hctx->host, srv->errh, hctx->conf.debug, 0);
if (hctx->proc && hctx->proc->is_local) {
server * const srv = r->con->srv;
if (0 == srv->srvconf.max_worker)
gw_restart_dead_procs(hctx->host,srv->errh,hctx->conf.debug,0);
}
/* cleanup this request and let request handler start request again */
if (hctx->reconnects++ < 5) return gw_reconnect(hctx, r);

Loading…
Cancel
Save