HAProxy community

How can you configure the nginx `client_max_body_size` equivalent in HAProxy


#1

I’m trying to upload some files that are too large, and I can’t figure out how to configure the request size limit.


#2

There is no such limit in haproxy.

What problem are you trying to solve? Do you want to limit the body size in haproxy or are you troubleshooting an upload problem?


#3

Trying to troubleshoot an upload problem.

That’s odd.

I’m running a private Docker registry behind HAProxy. It usually works just fine, but when uploading a particularly large image containing some machine learning models, it fails each time.

Maybe the issue is actually coming from the registry?


#4

In that case I’d suggest to enable logging on haproxy, so we can see how it fails and why.

Something like this:

global
 log 127.0.0.1 syslog debug
defaults
 log global
 mode http
 option httplog

Make sure you have a active syslog server on 127.0.0.1.


#5

Hey Patrick,

I am facing the exact same problem. Trying to run my docker registry behind HAProxy. Pushing images to the registry works fine for small images, but it fails for larger ones.

Were you able to resolve this?
Best regards,
prasath


#6

It was cloudflare not haproxy


#7

Hi thanks, can you explain what exactly went wrong on the cloudflare side? I am using letsencrypt, maybe it suffers from the same issue.