Skip to content

Containers Beta: Provisioning Failure - Instances Stuck in Inactive / Unknown State #9877

Open
@simonturner16

Description

@simonturner16

What versions & operating system are you using?

Wrangler: v4.23.0, node v22.16.0, Docker desktop v4.42.1

Please provide a link to a minimal reproduction

https://github.com/simonturner16/bander

Describe the Bug

When deploying a Cloudflare Container attached to a SQLite-backed Durable Object, the wrangler deploy command succeeds and reports the creation of a new container application. However, the container instance never becomes active.

/wrangler.jsonc
/src/index.js
/templates/static/Dockerfile
/templates/static/server.js

Steps to Reproduce:
Clone the minimal reproduction repository provided above.
Run npm install.
Run npx wrangler deploy. The deployment will succeed.
Access the deployed Worker URL.
Observed Behaviour:
The request to the Worker URL hangs for approximately 30 seconds and then returns a 503 error with the message "The Moku instance failed to become healthy in time."
When inspecting the application in the Cloudflare Dashboard under Workers & Pages -> Containers:
A new instance is created for each request.
All created instances remain permanently in a State: Inactive.
The Location and Container Version for these instances are always Unknown.
This behavior is consistent even after:
Performing clean deployments by manually deleting the Container Application from the UI before re-deploying.
Upgrading the instance type from the default dev to basic.
Switching the container image from a custom Dockerfile to the public nginx:alpine image.
The core issue appears to be a platform-level provisioning failure where the scheduler accepts the request but fails to place the container on a physical machine.
Expected Behaviour:
After the initial cold start period (15-60 seconds), the container instance should transition to an Active state with a valid Location. Subsequent requests to the Worker URL should be successfully proxied to the running container, returning the "Hello World" message.

Please provide any relevant error logs

Timestamp: 2025-07-07 20:06:57:749 UTC
Request Id: 95b9f722a8f82b11
HTTP 503

[2c3027271092a505c14f25f1f417c90f369c2f21aebd439b5936f0e96343f988] Attempting to fetch from container...
[2c3027271092a505c1f417c90f369c2f21aebd439b5936f0e96343f988] Connection attempt 1 failed: There is no container instance that can be provided to this Durable Object, try again later. Retrying...
[2c3027271092a505c1f417c90f369c2f21aebd439b5936f0e96343f988] Attempting to fetch from container...
[2c3027271092a505c1f417c90f369c2f21aebd439b5936f0e96343f988] Connection attempt 2 failed: There is no container instance that can be provided to this Durable Object, try again later. Retrying...
...
(logs continue for 15 retries)
...
[2c3027271092a505c1f417c90f369c2f21aebd439b5936f0e96343f988] Attempting to fetch from container...
[2c3027271092a505c1f417c90f369c2f21aebd439b5936f0e96343f988] Connection attempt 15 failed: There is no container instance that can be provided to this Durable Object, try again later. Retrying...
[2c3027271092a505c1f417c90f369c2f21aebd439b5936f0e96343f988] Timed out waiting for container instance to become healthy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that isn't working

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions