Peak Connections limit being reached

162 views
Skip to first unread message

Ken Snyder

unread,
Dec 7, 2015, 4:28:46 PM12/7/15
to Firebase Google Group
I've read through the discussion list and see that I'm not the first person to run into this but I think my problem is distinct. I have an EmberJS client which would connect to firebase and I can't see the concurrent connections going above 10-15 at this point (more likely 1-5) but I also have some micro-services which get engaged on an event basis and I suspect that I'm not correctly disconnecting these connections when the micro-service completes. 

Can someone help me understand the right way of:

  1. ensuring that when a nodejs/lambda microservice concludes that it closes the connection
  2. is there a way of clearing up all concurrent connections as I am not at 80 or so and all I'm doing is testing (testing authorisation which is part of the problem)
Would love to hear from folks.

Michael Lehenbauer

unread,
Dec 8, 2015, 3:23:10 PM12/8/15
to Firebase Google Group
Hey Ken,

Firebase will by default maintain a connection indefinitely.  To close the connection manually, you can use "Firebase.goOffline();"  This will disconnect all Firebase instances within the process though, so depending on how your microservice architecture works, I don't know if this will be appropriate (maybe you can explain more).

Another option might be to just use our REST API if you're just making one-off read/write requests in your micro service code (i.e. you don't need event subscriptions).  This will avoid having long-lived connections entirely.

There's no way to clear all concurrent connections for your Firebase.  You'll need to figure out what's connected and disconnect it (e.g. kill all your microservice processes or whatever).

Hope this helps,
-Michael

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/85049098-ca3b-400a-ade3-8051e1a279f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages