Skip to content

[Bug]: Service Stack healthcheck auto-generated with interval: 2s saturates PHP-FPM workers and makes app unreachable #9439

@itsbrody

Description

@itsbrody

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

  1. Deploy the built-in nextcloud-with-postgres Service Stack
  2. Observe CPU usage of the Nextcloud container immediately after start
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ✅ DoneIssues that are fixed and a PR is ready to be merged.🚧 NextIssues and PRs planned for the next release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions