# HG changeset patch # User Igor Sysoev # Date 1228745549 0 # Node ID f4603d71f532b985ae3f1e1c810873f78d6fa821 # Parent 7148efbdd7980c423c5d4d9b4ff187758817c33a log 503 error reason diff --git a/src/http/modules/ngx_http_limit_zone_module.c b/src/http/modules/ngx_http_limit_zone_module.c --- a/src/http/modules/ngx_http_limit_zone_module.c +++ b/src/http/modules/ngx_http_limit_zone_module.c @@ -189,6 +189,10 @@ ngx_http_limit_zone_handler(ngx_http_req 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_req 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; }