Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How long does Firebase throttle you?

Even with debug enabled for RemoteConfig, I still managed to get the following:

Error fetching remote config values Optional(Error Domain=com.google.remoteconfig.ErrorDomain Code=8002 "(null)" UserInfo={error_throttled_end_time_seconds=1483110267.054194})

Here is my debug code:

let debug = FIRRemoteConfigSettings(developerModeEnabled: true)
FIRRemoteConfig.remoteConfig().configSettings = debug!

Shouldn't the above prevent throttling?

How long will the throttle error remain in effect?

like image 626
4thSpace Avatar asked Dec 30 '16 14:12

4thSpace


3 Answers

I've experienced the same error due to throttling. I was calling FIRRemoteConfig.remoteConfig().fetchWithExpirationDuration with an expiry that was less than 60 seconds.

To immediately get around this issue during testing, use an alternative device. The throttling occurs against a particular device. e.g. move from your simulator to a device.

The intention is not to have a single client flooding the server with fetch requests every second. Make sensible use of the caching it offers out of the box and fetch only when necessary.

like image 101
applejack42 Avatar answered Dec 22 '22 00:12

applejack42


When you receive this error, plug the value of error_throttled_end_time_seconds into an epoch converter (like this one at https://www.epochconverter.com) and it will tell you the time when throttling ends. I've tested this myself, and the throttling remains in effect for 1 hour from the first moment you are throttled. So either wait an hour or try some of the other recommendations given here.

UPDATE: Also, if you continue making config requests and receive the throttle error, the expire timeout does not increase (i.e. "you are not further penalized").

like image 37
jarrodparkes Avatar answered Dec 21 '22 23:12

jarrodparkes


The quick and easy hack to get your app running is to delete the application and reinstall it. Firebase identifies your device as new device on reinstalling. Hope it helps and save your time.

like image 33
Kunal Gupta Avatar answered Dec 22 '22 00:12

Kunal Gupta