Caddy hangs when adding new config via API (after hundreds of successful uses over years) #6844
Open
9 of 10 tasks
Labels
help wanted 🆘
Extra attention is needed
Tested with v2.7.5, v2.8.4, and v2.9.1.
I'm using Caddy as a reverse proxy for ssh and https to hundreds of LXCs and VMs.
My
~/.config/caddy/autosave.json
is approaching 200kb.Most of the configs are very similar in nature - just the domain name and instance IP are changed in various places. In fact, the last 30+ configs have been exactly the same.
Over the past few years an API call would occasionally hang and I'd have to make the request again, but it's been mostly set it and forget it.
Starting tonight - with no changes to the caddy server or API config templates, which have been working for months - the failure rate (hanging) suddenly became so high that I can no longer use the API for a complete set of changes.
I've include my API calls below. Caddy will hang on any of them, but it won't make it through more than 3 before hanging and never completing. I have not been able to get it to complete a full set of changes, even after restarts and upgrades.
Loading the full config from scratch via API has always been hit or miss - so I typically just add each piece individually as shown in the curl examples below.
If I load a barebones template of
~/.config/caddy/autosave.json
and then load the most recent backup from the API, that works. That may just have been the luck of the draw, or it may indicate that the number of configs and size of the file is related to the hanging.Troubleshooting
-rw-r--r--
)caddy
doesn't fix the issue~/.local/share/caddy
(a restart after that would put us over the Let's Encrypt limits)
Example Config
This omits a fair amount of boilerplate from the initial setup - which has not changed and has been working for a long, long time - but rather represents the config that is added for new LXCs and VMs.
Example API Calls
XCaddy
This is the script that I use to build caddy. I just did a fresh build with the latest
xcaddy
,go
, andcaddy
today.Example full config reload
This hangs forever.
The text was updated successfully, but these errors were encountered: