fmidev / weather-app

FMI's official weather application for mobile devices
6 stars 2 forks source link

issue-534: increased axiosClient default timeout #550

Closed geosaaga closed 2 months ago

geosaaga commented 2 months ago

Tested the app with simulated 2G connection speeds. 10s timeout was too short to load forecasts and observations, 20s timeout seems to work much better.

Other idea was to add retries if API queries fail, but didn't implement that yet, because it might cause too many connections to pile up on server if we run 20s + 20s queries for large number of users. At least it would need some discussions with server people.

Also didn't add timeout to configuration, because that caused cyclic dependency with imports and probably there is no need to change default timeout.