mirror of
https://github.com/nginx/nginx.git
synced 2025-06-11 12:22:41 +08:00
log 503 error reason
This commit is contained in:
parent
4bc0dcf701
commit
38a2933b67
@ -189,6 +189,10 @@ ngx_http_limit_zone_handler(ngx_http_request_t *r)
|
||||
|
||||
ngx_shmtx_unlock(&shpool->mutex);
|
||||
|
||||
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
|
||||
"limiting connections by zone \"%V\"",
|
||||
&lzcf->shm_zone->name);
|
||||
|
||||
return NGX_HTTP_SERVICE_UNAVAILABLE;
|
||||
}
|
||||
|
||||
@ -206,6 +210,11 @@ ngx_http_limit_zone_handler(ngx_http_request_t *r)
|
||||
node = ngx_slab_alloc_locked(shpool, n);
|
||||
if (node == NULL) {
|
||||
ngx_shmtx_unlock(&shpool->mutex);
|
||||
|
||||
ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
|
||||
"could not allocate memory in zone \"%V\"",
|
||||
&lzcf->shm_zone->name);
|
||||
|
||||
return NGX_HTTP_SERVICE_UNAVAILABLE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user