FAQ

Page Discussion History

Difference between revisions of "HttpDegradationModule"

(Created page with "= Directives = == degradation == This module allow to return 204 or 444 code for some locations on low memory condition: <geshi lang="nginx"> http { degradation sbrk=50...")
 
(Directives)
Line 1: Line 1:
= Directives =
+
= Synopsis =
== degradation ==
+
 
+
 
This module allow to return 204 or 444 code for some locations on low
 
This module allow to return 204 or 444 code for some locations on low
 
memory condition:
 
memory condition:
Line 20: Line 18:
 
malloc() may use mmap(). It can be used on FreeBSD before 7.0 and on 7.0+
 
malloc() may use mmap(). It can be used on FreeBSD before 7.0 and on 7.0+
 
if MALLOC_OPTIONS=Dm.
 
if MALLOC_OPTIONS=Dm.
 +
 +
= Directives =
 +
 +
== degradation ==
 +
'''syntax:''' ''degradation mem_used''
 +
 +
'''default:''' ''none''
 +
 +
'''context:''' ''http, server, location''
 +
 +
== degrade ==
 +
'''syntax:''' ''degrade error_code''
 +
 +
'''default:''' ''none''
 +
 +
'''context:''' ''location''

Revision as of 18:04, 30 April 2012

Contents

Synopsis

This module allow to return 204 or 444 code for some locations on low memory condition:

http {
    degradation  sbrk=500m;
 
    server {
 
       location /some {
           degrade  204;
       }

Currently it can be used if sbrk(0) syscall reports real memory volume allocated by a proccess. It does not work for Linux and FreeBSD 7.0+ where malloc() may use mmap(). It can be used on FreeBSD before 7.0 and on 7.0+ if MALLOC_OPTIONS=Dm.

Directives

degradation

syntax: degradation mem_used

default: none

context: http, server, location

degrade

syntax: degrade error_code

default: none

context: location