21

Ive been using ngrok to test an app on my phone, with react-native for the past 2 weeks. And so far its been pretty decent and quick.

Until today. Now it suddenly takes about 50 seconds for a request to make a roundtrip from my phone, to my localhost and back. Or from my browser, to the ngrok tunnel, back to my localhost.

At first I thought, ok ngrok is either down or experiencing slowdowns. But then I decided to hit it with Postman, and with that the request is fast. Around 0.5 seconds. Same when I access the tunnel stats. A replay request is like 1second.

Just when I do it over my phone, or browser its now extremely slow. Is there any specific reason this may suddenly be occuring? Can anyone shed any light on where I should even begin looking?

I've tried rebooting, and flushing DNS, to no avail.

Kylie
  • 11,421
  • 11
  • 47
  • 78

2 Answers2

14

This can be optimized by selecting the datacenter closest to you. If you are for example from Germany, so you should be using the EU region to minimize any latency. To start your tunnel using the --region tag:

ngrok http --region eu <port>

Here's more about the global datacenter regions: https://ngrok.com/docs#global

Tenarius
  • 540
  • 1
  • 5
  • 23
-2

Based on Tenarius answer, Change to another region, and then change again to the nearest datacenter. it works for me

Naufal Hafizi
  • 42
  • 1
  • 2