Mercurial > hg > nginx
comparison src/http/ngx_http_file_cache.c @ 5822:063f7e75f9ef
Upstream: suppressed the file cache slab allocator error messages.
The messages "ngx_slab_alloc() failed: no memory in cache keys zone"
from the file cache slab allocator are suppressed since the allocation
is likely to succeed after the forced expiration of cache nodes.
The second allocation failure is reported.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Fri, 05 Sep 2014 18:14:59 +0400 |
parents | 44b9ab7752e3 |
children | 2c89956b6a76 |
comparison
equal
deleted
inserted
replaced
5821:3f5f0ab59b35 | 5822:063f7e75f9ef |
---|---|
143 } | 143 } |
144 | 144 |
145 ngx_sprintf(cache->shpool->log_ctx, " in cache keys zone \"%V\"%Z", | 145 ngx_sprintf(cache->shpool->log_ctx, " in cache keys zone \"%V\"%Z", |
146 &shm_zone->shm.name); | 146 &shm_zone->shm.name); |
147 | 147 |
148 cache->shpool->log_nomem = 0; | |
149 | |
148 return NGX_OK; | 150 return NGX_OK; |
149 } | 151 } |
150 | 152 |
151 | 153 |
152 ngx_int_t | 154 ngx_int_t |
696 ngx_shmtx_lock(&cache->shpool->mutex); | 698 ngx_shmtx_lock(&cache->shpool->mutex); |
697 | 699 |
698 fcn = ngx_slab_calloc_locked(cache->shpool, | 700 fcn = ngx_slab_calloc_locked(cache->shpool, |
699 sizeof(ngx_http_file_cache_node_t)); | 701 sizeof(ngx_http_file_cache_node_t)); |
700 if (fcn == NULL) { | 702 if (fcn == NULL) { |
703 ngx_log_error(NGX_LOG_ALERT, ngx_cycle->log, 0, | |
704 "could not allocate node%s", cache->shpool->log_ctx); | |
701 rc = NGX_ERROR; | 705 rc = NGX_ERROR; |
702 goto failed; | 706 goto failed; |
703 } | 707 } |
704 } | 708 } |
705 | 709 |