marschro
Phoenix LiveView - App responds slow in Production environment every ~20 seconds
Hello all,
I am currently experiencing some strange behavior on my production environment.
- I run a Phoenix LiveView App
- Server is FreeBSD with haproxy upfront
The behavior
- If you navigate the liveView app via navigation items that trigger
link navigate, this is most of the time fine. But every ~22 seconds the socket response is extremely slow and response, event with nearly zero change in the socket is about 4 to 6 seconds. - you can give it a try here: https://portal.devpunx.com (of course you have to click on the navigation for at leas 22 seconds… no need to click different nav-items… just keep clicking “home” or sth.)
- I do not have this on local, so it’s probably an environment effect.
What I tried to debug:
- I checked and changed timeouts on Server and OS but that seems not to cause the issue
- Also I checked if sockets break and reconnect, but they stay stable
- So it basically is slowed down for some reason.
- What makes me stutzig is the fact, that it occurs roughly every 22 seconds independently of if you click a lot or not so much.
Has anyone any idea how to approach that and how to debug?
Kind regards!
Marked As Solved
derek-zhou
portal.devpunx.com does not respond to ping and I cannot load the website though several popular website performance tools, such as pagespeed.web.dev. Feels like a misconfigured network. Have you complained to your hosting company?
Also Liked
D4no0
marschro
Okay, final update as its now fixed…
- I was debugging the app for days
- checking for memory leaks
- optimizing sockets
- debugging and logging haproxy
- checked server performance and issues
- searched for any possible side effect…
Now I opened a ticket at the hostel company and send them logs from mtr which showed significant packet loss.
They immediately knew what to do and fixed it. So it was finally no Phoenix, no Elixir, no Erlang, no BSD jails, no FreeBSD, no haproxy, no firewall issue…
but something in the “network backend” near de-cix… dunno anything on details.
But it shows, that really small problems can take days for debugging…
Heads up! never give up debugging ![]()
Thanks to everyone who just supported me, by giving their input to this thread - helped me to keep debugging ![]()
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









