Hi Gustavo,
> I compiled 1.6.3 from source with the options: TARGET=custom USE_PCRE=1
> USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1 USE_OPENSSL=yes
Unless you have a kernel older than 2.6.28, just use the linux2628
target:
TARGET=linux2628 USE_PCRE=1 USE_OPENSSL=1
This will enable all current kernel optimizations and features, including
splice, tproxy, accept4(), poll and epoll.
In fact you are probably only using select() right now, which is
pretty bad (check the output of haproxy -vv to make sure).
I would strongly recommend to recompile, unless performance
doesn't matter.
>> Below is my haproxy.cfg:
*If* you would use an ancient release (<= 1.5-dev21) that defaults
http-tunnel, http-server-close would indeed be needed, and it would
be missing in the photo_upload_backend backend.
But since thats not the case, I would suggest you remove
http-server-close completely, and let it fall back to keep-alive for
all http backends.
Whats seems to be missing though is a "mode http" declaration
in both lighttpd_backend and photo_upload_backend backends.
That is most likely the reason for your problem.
So the recommendation is to configure http mode and keep-alive in the
default section with proper timeouts (this should fix the issue):
default
mode http
option http-keep-alive
option prefer-last-server
timeout tunnel 3600s
timeout http-keep-alive 1s
Also:
- remove option http-server-close
- recompile with TARGET=linux2628
- cleanup to make the config more obvious: move default_backend below
use_backend
Regards,
Lukas