summaryrefslogtreecommitdiffhomepage
path: root/src/event
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2014-03-31 21:38:30 +0400
committerMaxim Dounin <mdounin@mdounin.ru>2014-03-31 21:38:30 +0400
commit23f66898463308fdc70ab2659273fb9804f29370 (patch)
tree3b714d7a7014f03c13c3340cfbca22a40248b275 /src/event
parent8f6958baa97b43d16185364dcfb7d68361012740 (diff)
downloadnginx-23f66898463308fdc70ab2659273fb9804f29370.tar.gz
nginx-23f66898463308fdc70ab2659273fb9804f29370.tar.bz2
Core: slab log_nomem flag.
The flag allows to suppress "ngx_slab_alloc() failed: no memory" messages from a slab allocator, e.g., if an LRU expiration is used by a consumer and allocation failures aren't fatal. The flag is now used in the SSL session cache code, and in the limit_req module.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/ngx_event_openssl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/event/ngx_event_openssl.c b/src/event/ngx_event_openssl.c
index 28e7aa509..e7b58136b 100644
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -1834,6 +1834,8 @@ ngx_ssl_session_cache_init(ngx_shm_zone_t *shm_zone, void *data)
ngx_sprintf(shpool->log_ctx, " in SSL session shared cache \"%V\"%Z",
&shm_zone->shm.name);
+ shpool->log_nomem = 0;
+
return NGX_OK;
}
@@ -1986,7 +1988,7 @@ failed:
ngx_shmtx_unlock(&shpool->mutex);
ngx_log_error(NGX_LOG_ALERT, c->log, 0,
- "could not add new SSL session to the session cache");
+ "could not allocate new session%s", shpool->log_ctx);
return 0;
}