Error Message and Logs
Description
When deploying a Service Stack (e.g. nextcloud-with-postgres), Coolify automatically
generates a healthcheck with an interval of 2 seconds:
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://127.0.0.1:80'
interval: 2s
timeout: 10s
retries: 15
Impact
With a 2 second interval and a 10 second timeout, Coolify fires 30 curl requests per
minute against the container. Each request occupies a PHP-FPM worker for up to 10
seconds. With the default PHP-FPM pool size of 12 workers, all workers are saturated
within seconds of container start. The application becomes completely unreachable.
Expected behavior
A sane default healthcheck interval for PHP-based applications should be at least 30s,
with a start_period of 60s to allow the app to initialize before health checks begin.
Steps to Reproduce
- Deploy the built-in nextcloud-with-postgres Service Stack
- Observe CPU usage of the Nextcloud container immediately after start
- All PHP-FPM workers run at full CPU, app returns 499/timeout for all requests
Example Repository URL
No response
Coolify Version
v4.0.0-beta.470
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04
Additional Information
Suggested fix
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
which worked
Error Message and Logs
Description
When deploying a Service Stack (e.g. nextcloud-with-postgres), Coolify automatically
generates a healthcheck with an interval of 2 seconds:
healthcheck:
test:
- CMD
- curl
- '-f'
- 'http://127.0.0.1:80'
interval: 2s
timeout: 10s
retries: 15
Impact
With a 2 second interval and a 10 second timeout, Coolify fires 30 curl requests per
minute against the container. Each request occupies a PHP-FPM worker for up to 10
seconds. With the default PHP-FPM pool size of 12 workers, all workers are saturated
within seconds of container start. The application becomes completely unreachable.
Expected behavior
A sane default healthcheck interval for PHP-based applications should be at least 30s,
with a start_period of 60s to allow the app to initialize before health checks begin.
Steps to Reproduce
Example Repository URL
No response
Coolify Version
v4.0.0-beta.470
Are you using Coolify Cloud?
No (self-hosted)
Operating System and Version (self-hosted)
Ubuntu 24.04
Additional Information
Suggested fix
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
which worked