diff src/event/ngx_event_openssl.c @ 5634:5024d29354f1

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 31 Mar 2014 21:38:30 +0400
parents 7c05f6590753
children 4c6ceca4f5f7
line wrap: on
line diff
--- 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_
     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;
 }