mixpanel / mixpanel-java

Other
49 stars 37 forks source link

Decrease default socket read timeout #24

Closed JensRantil closed 8 years ago

JensRantil commented 9 years ago

Question: What timeouts are your HTTP proxies/servers using?

Somewhat related to #21.

JensRantil commented 8 years ago

Hello, any input on this please?

patedit commented 8 years ago

@JensRantil Thanks for changing it. I was going to manually do it myself. Can you set the read timeout to 60s and the connection timeout to something like 10s?

JensRantil commented 8 years ago

@patedit Just making sure here, you are aware that the read timeout only applied when waiting for the first byte of HTTP response? Are you sure MixPanel can have response latencies up to 60 seconds? Sounds a bit high to me.

patedit commented 8 years ago

@JensRantil You're right. I want to have the same behavior as in Android and messed up the 60s, since in iOS is 60s -and we will change it soon. Should be 2s connection timeout and 10s read timeout. https://github.com/mixpanel/mixpanel-android/blob/master/src/main/java/com/mixpanel/android/util/HttpService.java#L106

JensRantil commented 8 years ago

@patedit I just fixed the conflict and set the timeouts according to

Should be 2s connection timeout and 10s read timeout.

(unless I misunderstood that somewhat unclear comment) Let me know if you'd like me to do anything else.

patedit commented 8 years ago

Thanks @JensRantil