HTTP response is larger than this size, HAProxy will return an HTTP 502 (Bad
Gateway) error. Note that the value set using this parameter will
automatically be rounded up to the next multiple of 8 on 32-bit machines and
- 16 on 64-bit machines. See also: tune.bufsize.large, tune.bufsize.small.
+ 16 on 64-bit machines. Since this value is already used while parsing
+ proxies (e.g. to load "errorfile" and "http-return" payloads), it must be set
+ in a global section placed before any other section, otherwise a warning is
+ emitted. See also: tune.bufsize.large, tune.bufsize.small.
tune.bufsize.large <size>
Sets the size in bytes for large buffers. By defaults, support for large
uses the same limit. It can be useful to push this limit further to
temporarily allow a buggy application to work by the time it gets fixed. The
accepted range is 1..32767. Keep in mind that each new header consumes 32bits
- of memory for each stream, so don't push this limit too high.
+ of memory for each stream, so don't push this limit too high. Since this
+ value is already used while parsing proxies (e.g. to load "errorfile"
+ payloads), it must be set in a global section placed before any other
+ section, otherwise a warning is emitted.
Note that HTTP/1.1 is a text protocol, so there is no special limit when the
message is sent. The limit during the message parsing is sufficient. HTTP/2
to already large requests or to POST requests. It is generally wise to set it
to about 1024. It is automatically readjusted to half of bufsize if it is
larger than that. This means you don't have to worry about it when changing
- bufsize.
+ bufsize. Since this value is already used while parsing proxies (e.g. to
+ check "http-return" payloads), it must be set in a global section placed
+ before any other section, otherwise a warning is emitted.
tune.max-rules-at-once <number>
Sets the maximum number of rules that can be evaluated at once in ruleset
return 0;
}
else if (strcmp(args[0], "tune.bufsize") == 0) {
+ uint old_bufsize = global.tune.bufsize;
+
if (*(args[1]) == 0) {
memprintf(err, "'%s' expects an integer argument", args[0]);
return -1;
return -1;
}
+ if (non_global_section_parsed) {
+ if (global.tune.bufsize < old_bufsize)
+ memprintf(err, "Shrinking '%s' after a non-global section will lead to runtime"
+ " failures particularly in HTTP. As a general rule, only change this"
+ " setting once and in the very first global section.", args[0]);
+ else
+ memprintf(err, "Changing '%s' after a non-global section will not affect parts"
+ " that were already parsed with the earlier value. As a general rule,"
+ " only change this setting once and in the very first global section.",
+ args[0]);
+ return 1;
+ }
return 0;
}
else if (strcmp(args[0], "tune.maxrewrite") == 0) {
return -1;
}
+ if (non_global_section_parsed) {
+ memprintf(err, "Changing '%s' after a non-global section will lead to runtime"
+ " failures particularly in HTTP. As a general rule, only change this"
+ " setting once and in the very first global section.", args[0]);
+ return 1;
+ }
return 0;
}
else if (strcmp(args[0], "tune.idletimer") == 0) {
return -1;
}
+ if (non_global_section_parsed) {
+ memprintf(err, "Changing '%s' after a non-global section will lead to runtime"
+ " failures particularly in HTTP. As a general rule, only change this"
+ " setting once and in the very first global section.", args[0]);
+ return 1;
+ }
return 0;
}
else if (strcmp(args[0], "tune.comp.maxlevel") == 0) {