Skip to content

Embedded mode: crash-loop protection and binary version detection #16

Description

@gsmlg

Crash-loop protection

When the Caddy process exits, Caddy.Server.Embedded dies and the supervisor restarts it (restart: :permanent). A persistently failing start (e.g. port 443 already in use) hits max restart intensity and takes down the whole Caddy.Supervisor — including Caddy.ConfigProvider, losing in-memory configuration.

Options:

  • Restart backoff, or
  • Transition to a held error state (align with the Caddy.State machine) instead of crashing repeatedly

Binary version detection

No caddy version detection or minimum-version check exists. Custom builds (xcaddy) with missing modules produce confusing adapt failures.

Proposal:

  • Caddy.version/0 → {:ok, %{version: "2.8.4", modules: [...]}} (via caddy version / caddy list-modules)
  • Startup compatibility check with a clear log message when the binary is too old or missing required modules

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions