comparison src/http/modules/ngx_http_limit_zone_module.c @ 2373:f4603d71f532

log 503 error reason
author Igor Sysoev <igor@sysoev.ru>
date Mon, 08 Dec 2008 14:12:29 +0000
parents 7148efbdd798
children 2bce3f6416c6
comparison
equal deleted inserted replaced
2372:7148efbdd798 2373:f4603d71f532
187 goto done; 187 goto done;
188 } 188 }
189 189
190 ngx_shmtx_unlock(&shpool->mutex); 190 ngx_shmtx_unlock(&shpool->mutex);
191 191
192 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
193 "limiting connections by zone \"%V\"",
194 &lzcf->shm_zone->name);
195
192 return NGX_HTTP_SERVICE_UNAVAILABLE; 196 return NGX_HTTP_SERVICE_UNAVAILABLE;
193 } 197 }
194 198
195 node = (rc < 0) ? node->left : node->right; 199 node = (rc < 0) ? node->left : node->right;
196 200
204 + len; 208 + len;
205 209
206 node = ngx_slab_alloc_locked(shpool, n); 210 node = ngx_slab_alloc_locked(shpool, n);
207 if (node == NULL) { 211 if (node == NULL) {
208 ngx_shmtx_unlock(&shpool->mutex); 212 ngx_shmtx_unlock(&shpool->mutex);
213
214 ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
215 "could not allocate memory in zone \"%V\"",
216 &lzcf->shm_zone->name);
217
209 return NGX_HTTP_SERVICE_UNAVAILABLE; 218 return NGX_HTTP_SERVICE_UNAVAILABLE;
210 } 219 }
211 220
212 lz = (ngx_http_limit_zone_node_t *) &node->color; 221 lz = (ngx_http_limit_zone_node_t *) &node->color;
213 222