Sprite stuck on HTTP 502, cannot exec or console

My sprite util-01 (org raymond-yee) persistently returns 502 on any connection:

% sprite exec -o raymond-yee -s util-01 -- echo hello
Error: failed to start sprite command: failed to connect: websocket: bad handshake (HTTP 502)

All 5 other sprites in the same org work fine. API (sprite ls) works. Retried multiple times — same result. Appears to be a stuck VM state. Is there a way to force-restart, or does this need server-side help?

2 Likes

This is very common for me as well. I wish they were more reliable or Fly would post some statment of what to expect with 502.. Is this growing pains, or something developers should account for.

3 Likes

I’ve been getting this as well. For what it’s worth, I was just able to revive a sprite that had seemingly gotten into this broken state by hitting its http service url a few times. It gave me a 502 the first couple of times, but then it woke back up and console/exec started working as well.

Interestingly, the sprite didn’t actually have any http services registered…the http endpoint returned an empty response body with a 502 status code when the sprite was “dead”, but once it woke back up the endpoint produces a 502 with a plain text “Bad Gateway” response body (since there was no service to respond).

I don’t have any other sprites in this broken state to test against, so I can’t say whether this workaround will bring back broken sprites consistently, though.

1 Like

Thanks for your tip. I tried waking up my poor sprite by accessing the HTTP endpoint several times but to no avail. Still hoping to hear from a fly.io sys admin.

Same issue, sprite was working fine earlier and now returning 502. https://api.sprites.dev/v1/sprites returns that the sprite is cold but logs, services start, services stop all return 502

1 Like

I’ve got multiple sprites experiencing this as well. Hitting the sprite URL hasn’t helped unfortunately.

1 Like

I can now get in now after upgrading to the latest version of sprite.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.