Backend sent response (in log) but browser stuck loading for precisely 2 minutes

  • This happens on multiple pages. Seems to happen on any type crud operation - seen it on create, update, reads
  • Whenever it gets stuck, the browser always loads but after exactly 2 minutes
  • In the backend logs, I see the request ([info] GET /admin/users). And then I see all of the SQL queries. But there’s a long pause. Then after a while, I see another? request ([info] GET /admin/users again) followed by queries (again) and then [info] Sent 200 in 56ms and the browser actually loads
  • This happens on both firefox & safari. I notice it far more often on Firefox
  • Only in development. Prod works fine

Example from network tab:

Still trying to narrow down the cause. Any thoughts/suggestions appreciated

2 Likes

Interesting. Are there too many connections open locally?

1 Like

Seems unlikely I’d guess. A few files from the backend + a websocket for live reload. But that wouldn’t explain blocking for 2 minutes. I’ll try increasing that firefox setting!

Hi there - I think we’re experiencing this issue too. The exactly 2 minutes hang is the same symptom for us. Did you manage to get to the bottom of it?

1 Like

Unfortunately no :frowning: The firefox setting didn’t work.

I’ve been restarting my local dev server everytime it starts happening and forgot this has been a pain point for me. I’ll have to start stripping the project down to see if I can narrow down

To throw in more context, I run my server in a docker container

I’ve seen this happen too, only on Firefox for some reason, it happens even without running in a docker container for me, and I’ve been unable to figure out the cause. I always thought it was a Firefox issue rather than something with phoenix because the backend responses were being sent out by the application.

Thanks all. I’ve filed an issue over here. Please chip in with more detail if you’re also experiencing this and we can try and get some usable debug info together. Browser freezing for two minutes on LiveReload · Issue #129 · phoenixframework/phoenix_live_reload · GitHub

2 Likes