Errofile page truncated by haproxy


#1

Hi Community,

This is my first topic :blush:
I have a problem with the configuration of an error page on haproxy version 1.8.14 … I have already configured several error pages without problems on the same instance.
The page that is creating problems unlike the other uses svg (Scalable Vector Graphics) .
The page served from haproxy is truncated (always in the same place), if I increase the tune.bufsize the problem is solved, but I do not want to increase it to avoid resource problems (possibly causing the system to run out of memory).
I thought it was a problem related to the size of http headers but I do not think this is the problem because testing a “curl -s -w % {size_header} page” the size is 260 bytes.
The page has 144k size, but I have a larger page that works correctly.
By serving the page from an apache via errorloc the problem does not occur … but I do not want to handle error pages from webserver but from haproxy …
From log i see nothing strange respect other error page :

k4m0_http_fe k4m0_http_fe/ 0/-1/-1/-1/0 403 16384 - - PR-- 5/1/0/0/0 0/0 {|} “GET / HTTP/1.1”

also with echo “show errors” | socat … nothing

Does anyone have any idea what the problem might be?

Thank you so much
K4m0


#2

That’s expected behavior:

https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#4-errorfile

The files should not exceed the configured buffer size (BUFSIZE), which
generally is 8 or 16 kB, otherwise they will be truncated.


#3

I have already read that doc(for this i have try to increase the tune.bufsize)…
I have error file with dimension of 150k on the same balancer and work without problem. (also without increase tune.bufsize).
P.S Default on my version is 16KB for bufsize


#4

It’s clearly stated that this is not supported and what happens when you do it anyway, and this is what you are seeing (truncation).

What exactly do you expect here to happen?


#5

As i Wrote i have tested with other error file and it seem works.
I want only to be sure that there isn’t possibility to use page with that size.
I will check again if work correctly with the file of 150k.

Thanks


#6

There is no possibility to do this currently. Whether this partially works in some corner case or not is really irrelevant, as you cannot rely on it.