namxam
I have a nodejs application which uses the phoenix javascript package to connect to a phoenix application. It works fine as long as I do not restart the phoenix application. Once I restart it, I have to manually restart the node app as well.
I tried various setups, but it seems to be an issue with docker. Whenever I start the app locally (iex -S mix phx.server, mix phx.server, mix release && _…, prod and dev) it works as expected. After shutting down my phoenix app, node tries to reconnect. But as soon as I start the release in my docker container, node does not try to reconnect any more.
I also created a minimal web app which does show the same symptoms. Just to make sure, that it is not related to the node js websocket libraries.
UPDATE: I created a new socket + channel for testing purposes and it seems to be working there. So there has to be something wrong with my socket or channel implementation.
UPDATE: By carefully removing code, it boiled down to an issue with Phoenix.Tracker.
When removing the Phoenix.Tracker.track(…) code it works without any issues.
Has anyone an idea what might cause this behaviour. I guess I made a mistake but I have no idea which ![]()
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 1- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
namxam
Well, I found the issue and it all boiled down to the fact, that I had my
Phoenix.Trackerstarted after myEndpointimplementation. I still don’t know why this only happens when packaging in a docker container, but it now works.