Mercurial > hg > nginx
comparison src/os/win32/ngx_errno.h @ 4618:c05cfc46b3bc
Accept moderation in case of EMFILE/ENFILE.
In case of EMFILE/ENFILE returned from accept() we disable accept events,
and (in case of no accept mutex used) arm timer to re-enable them later.
With accept mutex we just drop it, and rely on normal accept mutex handling
to re-enable accept events once it's acquired again.
As we now handle errors in question, logging level was changed to "crit"
(instead of "alert" used for unknown errors).
Note: the code might call ngx_enable_accept_events() multiple times if
there are many listen sockets. The ngx_enable_accept_events() function was
modified to check if connection is already active (via c->read->active) and
skip it then, thus making multiple calls safe.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 11 May 2012 13:33:06 +0000 |
parents | d620f497c50f |
children | f1a0de6eb505 |
comparison
equal
deleted
inserted
replaced
4617:972642646f06 | 4618:c05cfc46b3bc |
---|---|
52 #define NGX_ENOMOREFILES ERROR_NO_MORE_FILES | 52 #define NGX_ENOMOREFILES ERROR_NO_MORE_FILES |
53 #define NGX_EILSEQ ERROR_NO_UNICODE_TRANSLATION | 53 #define NGX_EILSEQ ERROR_NO_UNICODE_TRANSLATION |
54 | 54 |
55 #define NGX_EALREADY WSAEALREADY | 55 #define NGX_EALREADY WSAEALREADY |
56 #define NGX_EINVAL WSAEINVAL | 56 #define NGX_EINVAL WSAEINVAL |
57 #define NGX_EMFILE WSAEMFILE | |
58 #define NGX_ENFILE WSAEMFILE | |
57 | 59 |
58 | 60 |
59 u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size); | 61 u_char *ngx_strerror(ngx_err_t err, u_char *errstr, size_t size); |
60 ngx_uint_t ngx_strerror_init(void); | 62 ngx_uint_t ngx_strerror_init(void); |
61 | 63 |