-
Notifications
You must be signed in to change notification settings - Fork 19
Unstable Behaviour of Fly.io Deployment #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @kingdomcoding , |
Hey @mickel8 The app is live, with the publisher page and the listener page and a sample of the logs The behaviour with a VPN is unchanged |
@kingdomcoding I assume that you use https://hexdocs.pm/ex_webrtc/ExWebRTC.ICE.FlyIpFilter.html? From logs, it looks like we can't get a response to any connectivity check. However, I cannot reproduce your error. What browser do you use? |
@mickel8 Yes, I use the if System.get_env("FLY_APP_NAME") do
config :solving_media, ice_ip_filter: &ExWebRTC.ICE.FlyIpFilter.ip_filter/1
end I've tested with Chrome on windows and ubuntu. I've not tried different server locations. I wonder if the ping time from my location could be a factor? PS: I'm happy to create a separate public repo and fly deployment if that helps Edit: I just tested Chrome on a mac- works fine, but windows and ubuntu still fail |
@kingdomcoding so the problem only happens on Windows and Ubuntu right? |
Let's do that. I would like to solve that problem as working Fly.io is one of our priorities |
Regarding ping. I don't think so |
It appears so. But to be clear, it works sometimes and fails sometimes, which is the issue.
Just realized LiveBroadcaster mimics the same issue. Repo. Live |
Hi, @mickel8 I wonder if there's good news on this issue, or if there's any way I can contribute to solving this Or if there's an alternative in the |
@kingdomcoding sorry for no response :( We have some priority work to do and I didn't have time to debug this further :/ The only way is to try to analyze debug logs and try to catch the problem. Unfortunately, a deep knowledge about the ICE protocol is needed :/ You can also try to deploy your app on bare machine according to: https://hexdocs.pm/ex_webrtc/bare.html |
Thanks! We'll pursue both and see what's possible |
@kingdomcoding thanks! Please, keep us updated :) We will get back to this issue ASAP |
Hey, @mickel8 From more log comparing, I now know that in the successful case, a conn check response is received which isn't received in the unsuccessful case. I also know that the conn check response came from the IP and port of a remote My hunch is that this inconsistent behaviour might be from the ice server the app depends on. I suspect that the app's selective connection might be caused by the (selective?) availability of the Googe ice server. Please confirm if I'm thinking in the right direction. My attempt at resolving this was to add Are there reliable stun servers you can recommend to eliminate this and check if this is the root of the problem? PS: I've now seen the connection fail on MacOS too |
I don't think so. In every case, google STUN responds correctly and we are able to gather srflx candidate on the server side :( I don't see much difference in these cases except ip addresses that are used. Might it be that your hosts are connected to different networks during tests? In particular, can the failing host be behind symmetric nat? You can check it here: https://www.checkmynat.com/ |
I'm still building my mental model for how WebRTC and ex_webrtc work. At the moment, my understanding is that the server sends a conn check to the stun server and receives a response which is successful or not. In my logs, Am I missing something in my understanding?
The failing hosts are behind a Port Restricted Cone |
First, we send stun binding req to the stun server to gather our public IP address. This operation always succeeds (look for new srflx candidate). We then send this public IP to the other side. Once we also receive some IP address es from the other side, we start performing conn checks, which sometimes fail. What is the type od nat of successful hosts? Also, could you check whether our demos work for you? |
I have a fly.io deployment of an audio streaming service largely adapted from
live_ex_webrtc
.There's a heisenbug on both the
publisher
andplayer
ends where sometimes they can start/join streams and sometimes that fails.I can confirm from
IO.inspect
s in my forks ofex_webrtc
andex_ice
that when it fails, valid candidate pairs are absent in thechecklist
of theICEAgent
s.Why that happens on fly.io and not locally and how to fix this is still unclear. Any help will be greatly appreciated.
For context, I'm running on two shared-cpu-1x@1024MB instances. Changing the machine specs didn't resolve the issue. Upgrading to a dedicated IPv4 address also didn't resolve it.
I'm happy to provide any other information that can help.
The text was updated successfully, but these errors were encountered: