Mercurial > hg > nginx-vendor-1-0
comparison src/http/modules/ngx_http_degradation_module.c @ 604:428c6e58046a NGINX_0_9_0
nginx 0.9.0
*) Feature: the "keepalive_disable" directive.
*) Feature: the "map" directive supports variables as value of a
defined variable.
*) Feature: the "map" directive supports empty strings as value of the
first parameter.
*) Feature: the "map" directive supports expressions as the first
parameter.
*) Feature: nginx(8) manual page.
Thanks to Sergey Osokin.
*) Feature: Linux accept4() support.
Thanks to Simon Liu.
*) Workaround: elimination of Linux linker warning about "sys_errlist"
and "sys_nerr"; the warning had appeared in 0.8.35.
*) Bugfix: a segmentation fault might occur in a worker process, if the
"auth_basic" directive was used.
Thanks to Michail Laletin.
*) Bugfix: compatibility with ngx_http_eval_module; the bug had
appeared in 0.8.42.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 29 Nov 2010 00:00:00 +0300 |
parents | c5122335e41d |
children | ad25218fd14b |
comparison
equal
deleted
inserted
replaced
603:94ea26a3b3aa | 604:428c6e58046a |
---|---|
84 NULL, /* exit master */ | 84 NULL, /* exit master */ |
85 NGX_MODULE_V1_PADDING | 85 NGX_MODULE_V1_PADDING |
86 }; | 86 }; |
87 | 87 |
88 | 88 |
89 static ngx_uint_t ngx_degraded; | |
90 | |
91 | |
92 static ngx_int_t | 89 static ngx_int_t |
93 ngx_http_degradation_handler(ngx_http_request_t *r) | 90 ngx_http_degradation_handler(ngx_http_request_t *r) |
94 { | 91 { |
95 ngx_http_degradation_loc_conf_t *dlcf; | 92 ngx_http_degradation_loc_conf_t *dlcf; |
96 | 93 |
137 } | 134 } |
138 | 135 |
139 /* unlock mutex */ | 136 /* unlock mutex */ |
140 | 137 |
141 if (sbrk_size >= dmcf->sbrk_size) { | 138 if (sbrk_size >= dmcf->sbrk_size) { |
142 ngx_degraded = 1; | |
143 | |
144 if (log) { | 139 if (log) { |
145 ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0, | 140 ngx_log_error(NGX_LOG_NOTICE, r->connection->log, 0, |
146 "degradation sbrk:%uzM", | 141 "degradation sbrk:%uzM", |
147 sbrk_size / (1024 * 1024)); | 142 sbrk_size / (1024 * 1024)); |
148 } | 143 } |
149 | 144 |
150 return 1; | 145 return 1; |
151 } | 146 } |
152 } | 147 } |
153 | |
154 ngx_degraded = 0; | |
155 | 148 |
156 return 0; | 149 return 0; |
157 } | 150 } |
158 | 151 |
159 | 152 |