Running flask server on google colab through ngrok flask limiter not working

470 Views Asked by At

I am running a debug flask server on a google colab notebook through ngrok, i followed this article mainly: https://medium.com/@kshitijvijay271199/flask-on-google-colab-f6525986797b

I called this endpoint in a loop and pretty soon, a few number of requests came back with status 429. Next, I installed flask limiter, and tried to exempt that endpoint so I can send in high frequency requests. This didn't seem to work as I still got 429. I double checked the code for that flask limiter and couldn't spot any mistakes.

So I begin to think it may be the ngrok tunnel that's raising the 429 on my behalf (or overriding me)? Has anyone run into this and know for sure ngrok put a limit on you regardless of how you configure flask limiter?

I can provide code snippet upon request. But i hope anyone with more experience using the ngrok service can give me a feedback. (I will soon migrate to a permanent VM instead of colab and probably will find out soon and report back in case no one answers).

1

There are 1 best solutions below

0
On

This seems to have something to do with ngrok. Once I switched to a permanent VM and run it directly (without going through ngrok), there's no problem and the no limit seems to be respected.