Open Eden4897 opened 3 years ago
I'm using this https://github.com/kirillshevch/localtunnel-restarter. It automatically reconnects when there are connection issues.
If this happens sporadically, while already running, his may just be a connection hickup. There's a PR open with a retry policy: #311. Maybe you can upvote it to bring it to the maintainers attention?
I'm also experiencing occasional connection refused
- I establish the tunnel fine, everything works for a couple of hours, suddenly a wild connection refused
error appears and then it hangs. I found that it tries to start a new tunnel, but it waits forever on the axios request to get the assigned url. My solution is adding a 5s timeout to that axios call: #646
Hmm, by now I've built my own implementation that doesn't rely on axios.
I just tried adding the timeout for the fun of it but it fails.
I think the issue may actually reside in either the docker image, nginx, or the dev warning page.
When I run the same code against a locally hosted /localtunnel/server@v0.0.8
it works fine.
I always get this error around a few hours/days after I host my bot:
Is there a way to fix this problem? I did some research and saw that it was because of bad connectivity of the localtunnel servers. Is there anyway I can listen to this error or catch this error and reconnect to localtunnel after this? It has been an hassle trying to sort this out and have caused a lot of problems. Thanks.