-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
I tried out sprites.dev - very cool. To test sprite I made a small fastapi short story at https://wild-red-phoenix-jgh.sprites.app/ and shared the link. This worked great!
Next morning - the link was serving up "Bad Gateway"! 🙁 Not ideal obviously.
Claude Code says:
Service manager PID mismatch after VM boot causes bad gateway
After a VM restart, the Sprite service manager reports a stale PID for a running service, causing the HTTP proxy to return 502 Bad Gateway even though the underlying process is running and responding locally.
Steps to Reproduce:
- Configure a service with http_port (e.g., FastAPI on port 8000)
- Confirm service works externally
- VM gets stopped/restarted (either manually or due to idle timeout)
- Attempt to access the HTTP endpoint externally
Observed:
- External requests return 502 Bad Gateway
curl localhost:8000returns 200 (app is running)- sprite-env services list shows a stale PID (e.g., 285) while actual process is PID 3
- Workaround:
sprite-env services stop <name>&& sprite-env services start ` fixes the issue
Suggested Fix: On VM boot, the service manager should either:
- Reconcile PIDs with actual running processes before marking services as "running"
- Or ensure the proxy health-checks the actual port before routing traffic
Metadata
Metadata
Assignees
Labels
No labels