Machine POST requests appear to hang, but not when issued locally on machine

I’m working on deploying my Phoenix app to machines platform. I got things stood up and started poking around the app. Initially things worked, but POST requested have started failing.

Here’s a few observations:

  • If I take a cURL request and issue it from the machine itself (hitting 127.0.0.1:8080), then it works 100% of the time.
  • The request appears to make it to the instance because there’s a log entry created, but the request finished log never appears
  • It doesn’t affect GET at all, only POST.
  • It originally was not happening and is now happening close to every time.
  • Restarting the instance doesn’t fix it
  • There are no active database requests
  • There are no reductions being used by my app (would indicate CPU activity)

Is this an issue in the proxy layer? Maybe issuing a request but then terminating immediately? This app runs on nomad without issue. Current instance ID is e286564dfe03d8.

Edit:

I added debug logging + a manual IO.inspect on my application’s repo (all DB queries are made through it).

I have confirmed that when the POST hangs, no database query is made or tried to be made.

curl -X POST https://supered-backend-machine.fly.dev/ops/http -H 'Content-Type: application/json' -d '{"steve":"test"}'

curl -X POST https://supered-backend-machine.fly.dev/ops/http -H 'Content-Type: application/json'

The post with data will likely not complete, but the post without data will complete instantly. Further, my app appears to be stuck in read_body.

Is Fly Proxy correctly sending the request body to server?

Hi, looks like I have the same problem, but no solution yet https://community.fly.io/t/http-408-on-post-requests/11799/3

@sb8244 @Alexey Thanks for reporting. We are looking into the issue!

@sb8244 There’s an update in this thread - https://community.fly.io/t/http-408-on-post-requests/11799/7

Is the proposed solution to remove statics? Is that a bug with v2 or are statics not available there?

It’s a workaround. Statics should be working fine with apps v2, but apparently this issue doesn’t happen when they’re removed. I haven’t gotten time to look at it yet.

1 Like

Verified it does fix the POST issue.

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