Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
5633:b74f1106f920 | 5634:5024d29354f1 |
---|---|
1832 } | 1832 } |
1833 | 1833 |
1834 ngx_sprintf(shpool->log_ctx, " in SSL session shared cache \"%V\"%Z", | 1834 ngx_sprintf(shpool->log_ctx, " in SSL session shared cache \"%V\"%Z", |
1835 &shm_zone->shm.name); | 1835 &shm_zone->shm.name); |
1836 | 1836 |
1837 shpool->log_nomem = 0; | |
1838 | |
1837 return NGX_OK; | 1839 return NGX_OK; |
1838 } | 1840 } |
1839 | 1841 |
1840 | 1842 |
1841 /* | 1843 /* |
1984 } | 1986 } |
1985 | 1987 |
1986 ngx_shmtx_unlock(&shpool->mutex); | 1988 ngx_shmtx_unlock(&shpool->mutex); |
1987 | 1989 |
1988 ngx_log_error(NGX_LOG_ALERT, c->log, 0, | 1990 ngx_log_error(NGX_LOG_ALERT, c->log, 0, |
1989 "could not add new SSL session to the session cache"); | 1991 "could not allocate new session%s", shpool->log_ctx); |
1990 | 1992 |
1991 return 0; | 1993 return 0; |
1992 } | 1994 } |
1993 | 1995 |
1994 | 1996 |