Hi,<div><br></div><div>I've noticed an issue when limit_zone (and probably limit_req) is used. </div><div>If an nginx worker crashes, the cleanup functions for that request will not get called and the number of connections will not be decremented as it should be in ngx_http_limit_zone_cleanup().</div>
<div><br></div><meta charset="utf-8"><div>Since it's a shared memory segment when a new worker is started, the number of connection is still at the same value.</div><div>So if a worker crashes multiple times, we might end up always returning '503 Service Temporary Unavailable'.</div>
<div><br></div><div>I'm not sure there would be a way to call the cleanup functions if a worker has crashed, but maybe the rbtree for limit_zone should be re-initialized on a respawn ?</div><div><br></div><div>Thanks!</div>
<div><br></div><div>Matthieu.</div>