1. The problem I’m having:
Caddy stops after running for a while and I dont know why. Its been happening which leads to downtime . I would have to manually restart my server to get it working and its frustrating. Im hoping I can get a solution for this. thanks
2. Error messages and/or full log output:
When this happens , im unable to get logfile however when i run caddy status, I get this
caddy.service - Caddy
Loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: failed (Result: oom-kill) since Thu 2023-06-01 06:36:10 UTC; 5min ago
Docs: https://caddyserver.com/docs/
Process: 3062139 ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile (code=killed, signal=KILL)
Main PID: 3062139 (code=killed, signal=KILL)
CPU: 10min 19.533s
3. Caddy version:
caddy v2.6.4 h1:2hwYqiRwk1tf3VruhMpLcYTg+11fCdr8S3jhNAdnPy8=
4. How I installed and ran Caddy:
a. System environment:
Ubuntu 22.04.1 LTS (GNU/Linux 5.15.0-1019-aws aarch64)
b. Command:
sudo systemctl enable caddy
sudo systemctl start caddy
sudo systemctl restart caddy
c. Service/unit/compose file:
PASTE OVER THIS, BETWEEN THE ``` LINES.
Please use the preview pane to ensure it looks nice.
d. My complete Caddy config:
{
email myemail@gmail.com
storage s3 {
host "my host"
bucket "my-bucket"
access_id "my key"
secret_key "my key"
prefix "ssl"
insecure true
storage_clean_interval 100d
}
debug
on_demand_tls {
ask https://lave.live
interval 2m
burst 5
}
}
http:// {
redir https://{host}{uri}
}
*.lave.live, lave.live {
@www header_regexp www Host ^www\.(.*)$
redir @www https://{re.www.1} 301
tls {
dns route53 {
max_retries 10
aws_profile "my-key"
access_key_id "my-key"
secret_access_key "my-key"
region "my-region"
}
}
root * /var/www/lave/public
encode zstd gzip
file_server
php_fastcgi unix//var/run/php/php8.2-fpm.sock
}
https:// {
@www header_regexp www Host ^www\.(.*)$
redir @www https://{re.www.1} 301
tls {
on_demand
}
root * /var/www/lave/public/
encode zstd gzip
file_server
php_fastcgi unix//var/run/php/php8.2-fpm.sock
}