Maximum number of connections for GCM

200 views
Skip to first unread message

Sakis Kaliakoudas

unread,
Jun 22, 2015, 11:04:04 AM6/22/15
to andro...@googlegroups.com
I've been experimenting with the number of active connections with GCM trying to find the maximum allowed.

Before I go into details of my findings, what is the official GCM connection limit? Do you suggest to use the maximum number of connections allowed or a smaller number of connections? Is there a limit on the number of messages that can be sent though each connection?

I found that after 1000 (one thousand) connections give or take a couple of connections I started getting some exceptions looking like this one

org.jivesoftware.smack.sasl.SASLErrorException: SASLError using PLAIN: temporary-auth-failure
at org.jivesoftware.smack.SASLAuthentication.authenticationFailed(SASLAuthentication.java:365) ~[smack-core-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1033) ~[smack-tcp-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPConnection.java:937) ~[smack-tcp-4.1.0.jar:4.1.0]
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:952) ~[smack-tcp-4.1.0.jar:4.1.0]
at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_76]


Is this the limit, or is this exception related to something else? did try it multiple times.


Cheers,
Sakis


Francois Groulx

unread,
Jun 22, 2015, 11:35:02 AM6/22/15
to andro...@googlegroups.com
max 1000 as said here in the doc https://developers.google.com/cloud-messaging/server-ref#interpret-downstream

registration_ids
HTTPString array

This parameter specifies a list of devices (registration tokens, or IDs) receiving a multicast message. It must contain at least 1 and at most 1000 registration IDs.

Multicast messages (sending to more than 1 registration IDs) are allowed using HTTP JSON format only.




--
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/af2dc603-25f6-4c3a-acbe-fe516efadf44%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sakis Kaliakoudas

unread,
Jun 23, 2015, 7:17:00 AM6/23/15
to andro...@googlegroups.com
I am talking about the number of connections allowed with the GCM, not the number of registration Ids. Also, we are using XMPP not HTTP

Kiran Bagga

unread,
Jun 23, 2015, 12:38:35 PM6/23/15
to andro...@googlegroups.com
Hi

We have a limit of 1000 connections per SenderID for XMPP connections. You should limit your connections to that.

Sakis Kaliakoudas

unread,
Jun 23, 2015, 5:26:35 PM6/23/15
to andro...@googlegroups.com


Hello Kiran, 

thanks for the reply.


That's what I thought. Is that what you suggest as well? Would I have any real benefits by using more than a handful of connections?
Do you have any estimates on how many messages each connection can support or any other metrics that you can share with me with regards to the number of connections?

Best Regards,
Sakis 
Reply all
Reply to author
Forward
0 new messages