mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-27 07:02:11 +00:00
b3f32f5f8a
It is not always handy to manipulate large values exprimed in milliseconds for timeouts. Also, some values are entered in seconds (such as the stats refresh interval). This patch adds support for time units. It knows about 'us', 'ms', 's', 'm', 'h', and 'd'. It automatically converts each value into the caller's expected unit. Unit-less values are still passed unchanged. The unit must be passed as a suffix to the number. For instance: clitimeout 15m If any character is not understood, an error is returned.
25 lines
713 B
INI
25 lines
713 B
INI
# This is a test configuration.
|
|
# It is used to check that time units are correctly parsed.
|
|
|
|
global
|
|
maxconn 1000
|
|
stats timeout 3s
|
|
|
|
listen sample1
|
|
mode http
|
|
retries 1
|
|
redispatch
|
|
contimeout 5s
|
|
clitimeout 15m
|
|
srvtimeout 15m
|
|
maxconn 40000
|
|
bind :8080
|
|
balance roundrobin
|
|
option allbackups
|
|
server act1 127.0.0.1:80 weight 10 check port 81 inter 500ms fall 1
|
|
server act2 127.0.0.2:80 weight 20 check port 81 inter 500ms fall 1
|
|
server act3 127.0.0.3:80 weight 30 check port 81 inter 500ms fall 1
|
|
option httpclose
|
|
stats uri /stats
|
|
stats refresh 5000ms
|