snowplow / snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
http://snowplowanalytics.com
Apache License 2.0
109 stars 63 forks source link

Change default emit timeout from 5 seconds to 30 seconds #658

Closed matus-tomlein closed 8 months ago

matus-tomlein commented 8 months ago

Currently, there is an enforced emit timeout in the OkHttpNetworkConnection that defaults to 5 seconds after which it cancels the requests.

5 seconds is unlikely to be enough in many cases – slower cellular connections, switching between wifi and cellular. It can lead to requests being cancelled too early and resent again. This can then cause duplicates in the warehouse. On iOS, we use the default 60 seconds timeout (not configurable).

I suggest changing the default to 30 seconds. 30s would fit the currently set 15 seconds connection and 15 seconds read timeout, set here.