Connection timeouts when sending GCM messages

220 views
Skip to first unread message

Dmitry Trunin

unread,
Oct 7, 2015, 12:23:57 PM10/7/15
to android-gcm
Hello

Few days ago we have started to experience regular problems sending GCM messages from our servers via https://android.googleapis.com/gcm/send. At some random time GCM service stops to respond normally and part of requests fail with connection timeout (timeout is set to 2 seconds). This causes significant throughput degradation of sending messages. This degradation lasts for some time (from 5 minutes to few hours), and then GCM service starts to work normally again. We observed this several times:

October 6th, 15:35 - 18:00 (GMT)
October 5th, 15:40
October 4th, 17:20 - 18:45
October 2nd, 15:20 - 19:40
September 30th, 17:15 - 17:25

Graph below show the number of successfully sent GCM messages per 5 minutes on normal day and on day when we experienced connection timeouts.


What can be the reason of connection timeouts and how to deal with it? 

Best regards
Dmitry Trunin

Costin Manolache

unread,
Oct 7, 2015, 1:00:37 PM10/7/15
to andro...@googlegroups.com
In general, I would suggest using at least 5 second timeout. 

Could you also check the IP address you get for android.googleapis.com, and do a ping when this happens ? 

I'm not seeing any unusual latency spike on our side - there are occasional spikes to ~800ms, but 
only in individual DCs, global latency seems pretty smooth.

As usual, please make sure you retry with exponentially backoff and don't cache DNS records for too long.

Costin

--
You received this message because you are subscribed to the Google Groups "android-gcm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-gcm...@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-gcm/6e820792-3545-42d7-9585-602992801c99%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages