Closed blob42 closed 9 months ago
servers
is a global option, you don't apply it to a site.
Are you actually using proxy protocol? Do you have another proxy in front of Caddy which adds it? If not then that's definitely not the right thing to configure.
How can I setup the global servers options ?
Sorry you're right I don't have an other proxy in front.
I donty know if I should report this on the Caddy project ? I will take some pcap captures as well.
You're already configuring global options with your caddy_0
labels.
Configuring proxy_protocol
here is definitely wrong then. That's specifically only needed if you have another proxy in front of Caddy which prepends some data to the traffic sent along which contains the original IP address. The timeout is for "reading the proxy protocol bytes". Doesn't make sense for you.
From the log message, looks like only "bytes_read":66608
but the request was "Content-Length":["1667982"]
. It took 180 seconds to read only 66KB out of 1.6MB. That's strange. It just seems to me like your network is really really slow. Configuring timeouts won't help with that.
@francislavoie thanks for the detailed answer.
I am suspecting some kind of congestion problem on my network. It doesn't make sense that it works well if I remove the caddy proxy in my LAN.
I still would like to know how to configure the global :443 and :80 server options using labels if possible.
I will close the ticket for now as the issue is not likely with this project.
Thanks again for your time.
Hi. My uploads stall when using docker-proxy. I have had this issue since years but did not bother to track the problem before. I have exactly the same issue with a self hosted nextcloud instance, I cannot upload files.
So the issue is with uploads which randomly stall, if I upload directly to the upstream server without proxy I have no issue. I tried many options and issues and this one seems close enough.
I would like to set the option for caddy proxy_protocol timeout from this config:
Or any other options for the :443 server.
I tried adding to pre loaded Caddyfile but I guess this is overwritten by docker-proxy. I have the following in my compose file where I define caddy-docker-proxy:
Which gives the following error:
More context:
Looking at the debug logs of caddy-docker-proxy, there is some latency then the server reloads the full config after a few seconds while the upload request keeps stalled.
It is important to note that this caddy-proxy instance is running within a LAN and the upload request comes from said LAN (vlan). I have an other proxy instance over a public IP without any issues with uploads.
Here is a simple diagram of both setups:
Example upload request with log
Request:
Host localai.c.gopher:80 was resolved.
IPv6: (none)
IPv4: 10.50.96.80
Trying 10.50.96.80:80...
Connected to localai.c.gopher (10.50.96.80) port 80
caddy-docker-proxy logs: