Random 502 errors / requests taking too long

Hi,
just deployed an application, and one out of five requests takes for up to 1 minute
This request took 60286ms

HTTP/1.1 200 OK
content-type: application/json; charset=utf-8
date: Wed, 12 Oct 2022 04:22:43 GMT
transfer-encoding: chunked
server: Fly/54d1d920f (2022-09-30)
via: 1.1 fly.io
fly-request-id: 01GF56WD5GNK51DYE85EAA7V38-sin

also have seen 502 errors and in the logs

 error while making HTTP request to app: operation was canceled: request has been canceled

Could someone help me please? Is it something wrong with my setup ? Locally my app is working fine

1 Like

just deployed mine (no-cache, remote-only), and after successfully deployed it throws 502 in browser

I’m seeing this issue intermittently since yesterday. Requests times are between 500ms and 3s. The page in question is hitting a fairly simple Elixir/Phoenix page.

Here’s the proxy error in the logs:

proxy[343f6d8f] yyz [error]Error: error while making HTTP request to app: operation was canceled: request has been canceled

And the response:

HTTP/2 502 
server: Fly/54d1d920f (2022-09-30)
via: 2 fly.io
fly-request-id: 01GF901C5ENTDR93XM098XK995-yyz
date: Thu, 13 Oct 2022 15:40:04 GMT

Happens on shared and dedicated CPU. Looks like I’m seeing it approximately 1% of the time

1 Like

I’m also seeing this just now.

I have like a dozen random 502 errors logged in a queue and they all started today 05/05.

The last one is from a couple of minutes ago.

Same here, with a Strapi instance connected to a Supabase postgresql database.
It’s like it was “idle”; after 1 minute I get a 502 Bad Gateway response.
Sometimes, it works then… it works. If I try some hours later, it does it again.