Sprite stops responding to http requests

I’m using the sprite-env services thing to run a bun script that listens on 8080. The URL is public and used by a Slack app. The bot stopped responding at some point and stayed that way until I sprite console’d in to investigate.

Hate to be like this but: do services work?

Run sprite-env services list from the console and see if it’s showing you a restart count or anything.

You can also check service logs at /.sprite/logs/services/<name>.log

Services work for simple scripts, they don’t do so well for complicated scripts that fork / exit / etc.

When it wasn’t working, what error did you get?

Actually we have a theory. When the Sprite compute gets replaced and boots back up, it starts services then goes idle immediately. We think it may be idling before the bun service can fully start, and consoling in just kept it alive long enough to finish.

We have some improvements already merged that should help with this. If a service has an http port specified, it will retry for quite a while before it errors.

There’s no restart count. It looks like this

"sprite@vpt-assist:~$ sprite-env services list jq
[
{
“name”: “github-app-clone”,
“cmd”: “/.sprite/bin/ruby”,
“args”: [
“/home/sprite/github_app_clone.rb”
],
“needs”: [],
“state”: {
“name”: “github-app-clone”,
“status”: “running”,
“pid”: 341,
“started_at”: “2026-01-21T18:32:47.051530442Z”,
“next_restart_at”: “0001-01-01T00:00:00Z”
}
},
{
“name”: “vpt-detective”,
“cmd”: “/home/sprite/vpt-detective/start.sh”,
“args”: [],
“needs”: [],
“http_port”: 8080,
“state”: {
“name”: “vpt-detective”,
“status”: “running”,
“pid”: 7881,
“started_at”: “2026-01-21T23:22:33.892812283Z”,
“next_restart_at”: “2026-01-21T23:22:34.78924688Z”
}
}
]

If you have a fix out, I’ll just report back if it happens again!

1 Like

It happened again. sprite list shows the sprite as running, but it doesn’t respond to HTTP requests against the URL until I run sprite console.

This seems not a million miles away from what I was seeing in Sprite not starting on HTTP request (Bad Gateway) - #3 by kurt

The fix isn’t broadly deployed yet, so I’m not surprised! Hopefully today.

1 Like