1. The problem I’m having:
I’m getting a 504 Gateway timeout after 60 seconds even though my timeouts are set to 14400 seconds.
PHP max_execution time and input time are both 14400 seconds fpm doesn’t have terminate max time turned on.
2. Error messages and/or full log output:
504 Gateway Timeout
3. Caddy version:
v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=
4. How I installed and ran Caddy:
Installed via Apt repo
a. System environment:
Ubuntu 22.04, systemd
d. My complete Caddy config:
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
{
servers {
timeouts {
read_body 24h
read_header 24h
write 24h
idle 24h
}
}
}
:80 {
# Set this path to your site's directory.
root * /var/www/vhosts/web-app/current
encode zstd gzip
log
# Enable the static file server.
file_server
php_fastcgi 127.0.0.1:9000 { # 9000 is PHP8.2 and 9001 is PHP5.6
resolve_root_symlink
try_files {path} {path}.php {path}/index.php /index.php
dial_timeout 14400s
read_timeout 14400s
write_timeout 14400s
}
# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile