Get open subscriptions on Server

523 views
Skip to first unread message

Chandika J

unread,
Jul 9, 2013, 12:54:16 PM7/9/13
to meteo...@googlegroups.com
Hi all,

I have multiple subscriptions subscribing to the same collection. After a recent change CPU consumption goes through the roof at seemingly random times. My suspicion is that some subscriptions are not getting stopped correctly and are causing issues. 

Is there any way to find out how many subscriptions per collection are open etc. on the server?

Thanks
Chandika

Chris M

unread,
Aug 2, 2013, 3:45:39 PM8/2/13
to meteo...@googlegroups.com
Anyone have an update on this? I'm having the same issue over here.

Arunoda Susiripala

unread,
Aug 2, 2013, 7:51:42 PM8/2/13
to meteo...@googlegroups.com
Use Smart Collections. It solves this problem. 
--
You received this message because you are subscribed to the Google Groups "meteor-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-talk...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


--
Arunoda Susiripala


Chandika J

unread,
Aug 2, 2013, 11:15:37 PM8/2/13
to meteo...@googlegroups.com
I can attest to that. My idle was previously 25% CPU constantly with just about 10+ concurrent users and maxes out to 100% on some  updates happening in a short period. With this I could never even imagine scaling the app to even support 100 users.

SC solves it, <3% avg CPU, never more than 5-6% CPU for peaks for about 20 or so users now.

Even though it's solved, it'll be great to know whats running right now on the server side so that it opens possibilities to debug other related issues.


On Saturday, August 3, 2013 5:21:42 AM UTC+5:30, Arunoda Susiripala wrote:
Use Smart Collections. It solves this problem. 
meteorhacks.com/introducing-smart-collections.html

On Saturday, August 3, 2013, Chris M wrote:
Anyone have an update on this? I'm having the same issue over here.

On Tuesday, 9 July 2013 13:54:16 UTC-3, Chandika J wrote:
Hi all,

I have multiple subscriptions subscribing to the same collection. After a recent change CPU consumption goes through the roof at seemingly random times. My suspicion is that some subscriptions are not getting stopped correctly and are causing issues. 

Is there any way to find out how many subscriptions per collection are open etc. on the server?

Thanks
Chandika

--
You received this message because you are subscribed to the Google Groups "meteor-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-talk+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tim Haines

unread,
Aug 3, 2013, 1:48:30 AM8/3/13
to meteo...@googlegroups.com
Hi Chandika and Chris,

I've found a way to monitor the polling that's occurring against mongo, and this has highlighted a bug I had in not stopping some observers correctly.

The way I did it was by altering the LiveResultsSet._pollMongo method.  You'll find the method in the mongo-livedata package, inside the mongo_driver.js file.  Just before the self._synchronousCursor.rewind(); line, you can add something along the lines of this:

console.log(self._cursorDescription.collectionName,'selector', self._cursorDescription.selector);

And it will log the collection name and selector each time Mongo is polled.

Cheers,

Tim.

Arunoda Susiripala

unread,
Aug 3, 2013, 1:52:44 AM8/3/13
to meteo...@googlegroups.com
Good idea Tim.

I can add some of the logs into Smart Collections which show what's happening behind the scene.


--
You received this message because you are subscribed to the Google Groups "meteor-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meteor-talk...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Chandika Jayasundara

unread,
Aug 3, 2013, 4:26:40 AM8/3/13
to meteo...@googlegroups.com
Thanks Tim. Should try it out.

Arunoda it will be great to have a sort of a debug mode so we can take a look at whats happening behind SC as well.
Reply all
Reply to author
Forward
0 new messages