cloudflare / cloudflare/moltworker

Discord bot unresponsive when container sleeps

Open
#165 3 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
10k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

When using `SANDBOX_SLEEP_AFTER` to reduce costs, the Discord bot becomes completely unresponsive:

- Bot shows offline (Gateway WebSocket disconnects when container sleeps)
- Slash commands fail with "The application did not respond"
- Nothing wakes the container - commands can't be delivered to an offline bot

Currently the only workaround is `SANDBOX_SLEEP_AFTER=never`, which defeats the cost-saving purpose.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.