Last night my website hosted through Caddy went down. I was able to restart it by restarting the systemd process. Caddy ran for ~35 days without problem and I’m trying to identify why it crashed. When I run journalctl -u caddy.service there is not anything useful in the log, just the caddy launch message from Feb 23 and March 27. Any thoughts on how I can debug the crash?
What was in Caddy’s process log (specified with -log)? And what do you mean by “went down” - did the process terminate entirely or just stop responding to requests or something else?
systemd isn’t going to capture anything if you didn’t pass a -log option in your Caddy start script. You amend a -log stdout as a minimum to your caddy start script.
@matt on an aside maybe the Caddy logfile null value should be stdout or stderr instead of ioutil.Discard ? Why throw it away when things like journalctl could be capturing any crash output? Just my 2 cents