Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange spikes in users online count #17

Open
samim23 opened this issue Nov 23, 2013 · 70 comments
Open

Strange spikes in users online count #17

samim23 opened this issue Nov 23, 2013 · 70 comments

Comments

@samim23
Copy link

samim23 commented Nov 23, 2013

i´m using presence in a production app over at hyperboring.com.
noticing strange spikes at time in the online users count. 3 users are online but it will show 50-100 for 3-4 seconds and then go gradually back down.
Today the entire server died and when i looked at the logs, it was presence killing it.
Could this be related somehow? any thoughts are super welcome!

here´s my error log http://snipt.org/Bnv7

@dburles
Copy link
Collaborator

dburles commented Nov 23, 2013

Hey @samim23 I've come across this issue a couple of times, right now I'm trying to see if I can find a way to reproduce it. I'm also wanting to determine if this issue has been introduced in some of the later changes that have been made. Seems like @gabrielhpugliese has a similar issue: #12

@samim23
Copy link
Author

samim23 commented Nov 23, 2013

ok cool. what is your recommendation for the mean time? i´m thinking about removing presence for now.

@dburles
Copy link
Collaborator

dburles commented Nov 23, 2013

You could try downgrade to an earlier version, perhaps e59a127
you'll have to manually install the package to do this, just clone presence into packages.

@gabrielhpugliese
Copy link

It's hard to debug. I tried to debug localhost and coderstv.com with 50 chrome tabs, but couldn't reproduce. Do not know where to console.log either.

@gabrielhpugliese
Copy link

Hey, I've built a package just for this purpose. I do the interval on
client and insert/update the presence on client too. I'm going to test it
thursday with lots of different people. If it works I'll make a package.

Gabriel Pugliese
CodersTV.com
@CodersTV

On Fri, Nov 22, 2013 at 11:43 PM, David Burles [email protected]:

You could try downgrade to an earlier version, perhaps e59a127e59a127
you'll have to manually install the package to do this, just clone
presence into packages.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29122845
.

@samim23
Copy link
Author

samim23 commented Nov 28, 2013

@gabrielhpugliese very much looking forward to your patch as especially the issues with counters going up to 100 for a second seems to be getting worse and worse with scale. i´ve been researching "not using a heart" #10 a bit and seems like there is a more fundamental fix to be had in conjunction with that, or i´m i off track?

@gabrielhpugliese
Copy link

Well, it worked like a charm for a few minutes. I think it needs more
improvement. I will open source it soon so you can help on improvements.
Or probably this is a NP-hard problem :P

Gabriel Pugliese
CodersTV.com
@CodersTV

On Thu, Nov 28, 2013 at 7:20 AM, samim [email protected] wrote:

@gabrielhpugliese https://github.com/gabrielhpugliese very much looking
forward to your patch. i´ve been researching "not using a heart" #10https://github.com/tmeasday/meteor-presence/issues/10a bit and seems like there is a more fundamental fix to be had in
conjunction with that, or i´m i off track?


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29449249
.

@samim23
Copy link
Author

samim23 commented Nov 29, 2013

NP hard problem? how come a quake server browser solved this efficiently back in 1999 already? ;-) Anyhow, my issues are getting worse and worse now i´m hitting 1k daily users, even suspecting its pretty bad for the overall performance, could that be true? I´m gonna put in a day next week and will try to merge some of these libraries into a working solution, will share if i succeed.

@gabrielhpugliese
Copy link

Well, the load on my application hosted on a single-core CPU 2GHz goes to
2. 95% of cpu is for main.js When I turn it off, it goes to bottom. I have
no idea why.
Next Meteor version will provide a package called Facts that will give for
free how many subscriptions are active. Idk if it's enough for you.

Gabriel Pugliese
CodersTV.com
@CodersTV

On Thu, Nov 28, 2013 at 10:34 PM, samim [email protected] wrote:

NP hard problem? how come a quake server browser solved this efficiently
back in 1999 already? ;-) Anyhow, my issues are getting worse and worse now
i´m hitting 1k daily users, even suspecting its pretty bad for the overall
performance, could that be true? I´m gonna put in a day next week and will
try to merge some of these libraries into a working solution, will share if
i succeed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29490516
.

@gabrielhpugliese
Copy link

Well, I just improved it. Instead of inserting things on client, defining
allow rules in server, I've created a method and it's WORKINGOMG with 0.15
load on my server.
Want to test ? https://github.com/gabrielhpugliese/meteor-users-counter

Gabriel Pugliese
CodersTV.com
@CodersTV

On Fri, Nov 29, 2013 at 12:19 AM, Gabriel Pugliese <
[email protected]> wrote:

Well, the load on my application hosted on a single-core CPU 2GHz goes to
2. 95% of cpu is for main.js When I turn it off, it goes to bottom. I have
no idea why.
Next Meteor version will provide a package called Facts that will give for
free how many subscriptions are active. Idk if it's enough for you.

Gabriel Pugliese
CodersTV.com
@CodersTV

On Thu, Nov 28, 2013 at 10:34 PM, samim [email protected] wrote:

NP hard problem? how come a quake server browser solved this efficiently
back in 1999 already? ;-) Anyhow, my issues are getting worse and worse now
i´m hitting 1k daily users, even suspecting its pretty bad for the overall
performance, could that be true? I´m gonna put in a day next week and will
try to merge some of these libraries into a working solution, will share if
i succeed.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29490516
.

@samim23
Copy link
Author

samim23 commented Nov 29, 2013

@gabrielhpugliese you are amazing! i´m going to give this a spin right now and test it in-depth - will give you feedback asap.

@gabrielhpugliese
Copy link

Forgot to say, it works with 0.6.4.1 only - what's the meteor version
you're using ?

Gabriel Pugliese
CodersTV.com
@CodersTV

On Fri, Nov 29, 2013 at 4:06 AM, samim [email protected] wrote:

@gabrielhpugliese https://github.com/gabrielhpugliese you are amazing!
i´m going to give this a spin right now and test it in-depth - will give
you feedback asap.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29498240
.

@samim23
Copy link
Author

samim23 commented Dec 1, 2013

Ah to bad, i´m stuck on meteor 0.6.6.3 for now until the new render engine reaches a stable release. Hope i will get to that soon and i´ll get to check out your fix.

@dburles
Copy link
Collaborator

dburles commented Dec 1, 2013

Hey guys. I've just done a complete rewrite to make use of livedata. Would be awesome if you could try it out and let me know how it works for you. You can grab it from the livedata branch.

@gabrielhpugliese
Copy link

Nice David, gonna try it :) Thanks

Gabriel Pugliese
CodersTV.com
@CodersTV

On Sun, Dec 1, 2013 at 9:12 PM, David Burles [email protected]:

Hey guys. I've just done a complete rewrite to make use of livedata. Would
be awesome if you could try it out and let me know how it works for you.
You can grab it from the livedata branch.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29586213
.

@dburles
Copy link
Collaborator

dburles commented Dec 2, 2013

@gabrielhpugliese thanks!, interested to hear how you go.

@samim23
Copy link
Author

samim23 commented Dec 3, 2013

@dburles very cool stuff, thanks! I´ve been testing on my localserver and so far works like a charm! haven´t performance monitored fully yet but looking better off the bat. Might give it a shoot on the production server soon, anything to keep in mind with the transition?

@dburles
Copy link
Collaborator

dburles commented Dec 3, 2013

@samim23 Good to hear! the main differences I can think of are that A. the _id coming from the presences collection now is tied directly to the livedata session id, so these will drop on hot code reload, where previously it would reattach the session to the existing presence _id. and B. clients not connected through a socket, (long polling) take a while to drop off when disconnecting, not sure of the exact duration, but somewhere around 1 minute. I believe though that this may have already been an issue with the previous version. Anyway it's probably useful to be aware of this limitation.

@gabrielhpugliese
Copy link

Will this work on 6.4.1 ?

Gabriel Pugliese
CodersTV.com
@CodersTV

On Tue, Dec 3, 2013 at 10:34 AM, David Burles [email protected]:

@samim23 https://github.com/samim23 Good to hear! the main differences
I can think of are that A. the _id coming from the presences collection now
is tied directly to the livedata session id, so these will drop on hot code
reload, where previously it would reattach the session to the existing
presence _id. and B. clients not connected through a socket, (long polling)
take a while to drop off when disconnecting, not sure of the exact
duration, but somewhere around 1 minute. I believe though that this may
have already been an issue with the previous version. Anyway it's probably
useful to be aware of this limitation.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29705895
.

@dburles
Copy link
Collaborator

dburles commented Dec 3, 2013

@gabrielhpugliese I don't think so as it's relying on upsert which was introduced with 0.6.6

@gabrielhpugliese
Copy link

Okay :(

Gabriel Pugliese
CodersTV.com
@CodersTV

On Tue, Dec 3, 2013 at 11:57 AM, David Burles [email protected]:

@gabrielhpugliese https://github.com/gabrielhpugliese I don't think so
as it's relying on upsert which was introduced with 0.6.6


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29710985
.

@dburles
Copy link
Collaborator

dburles commented Dec 3, 2013

If you're feeling adventurous, it should work if you modify the upsert to the typical, check if exists, then run either an update or insert.

@gabrielhpugliese
Copy link

Or maybe update my project to 0.6.6 :P I'm postponing it forever. My
smart.json have a lot of git tags of previous versions.

Gabriel Pugliese
CodersTV.com
@CodersTV

On Tue, Dec 3, 2013 at 12:07 PM, David Burles [email protected]:

If you're feeling adventurous, it should work if you modify the upsert to
the typical, check if exists, then run either an update or insert.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29711708
.

@dburles
Copy link
Collaborator

dburles commented Dec 3, 2013

Yeah updating the project would be a good idea :)

@samim23
Copy link
Author

samim23 commented Dec 3, 2013

@dburles i´m running your new version on the production server now at https://hyperboring.com. So far works perfect and no strange user counter raises anymore. Performance is much better to, with memory consumption and CPU time both down by allot. Nice job, this is great!

@mizzao
Copy link

mizzao commented Dec 4, 2013

You guys may want to check out https://github.com/mizzao/meteor-user-status, which I've used in many projects and seems to be pretty stable and straightforward.

@gabrielhpugliese
Copy link

I've never used it because on docs it does not mention the possibility to
add custom vars to the presence doc. Is it possible ?

Gabriel Pugliese
CodersTV.com
@CodersTV

On Tue, Dec 3, 2013 at 10:52 PM, Andrew Mao [email protected]:

You guys may want to check out
https://github.com/mizzao/meteor-user-status, which I've used in many
projects and seems to be pretty stable and straightforward.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29767756
.

@mizzao
Copy link

mizzao commented Dec 4, 2013

@gabrielhpugliese I see - I always just assumed that anyone who would want to add anything on the client side would just add it to the profile field of a user doc, and that would be published/subscribed as normal. It didn't make sense to me to include an extra collection for this because presence information is already associated with each user (versus sessions, for example.)

@gabrielhpugliese
Copy link

For example, I need to know where an user is at the moment. I think it's
perfectly reasonable to stay on the presence doc, not on profile. It's
something ephemeral.

Gabriel Pugliese
CodersTV.com
@CodersTV

On Wed, Dec 4, 2013 at 12:11 AM, Andrew Mao [email protected]:

@gabrielhpugliese https://github.com/gabrielhpugliese I see - I always
just assumed that anyone who would want to add anything on the client side
would just add it to the profile field of a user doc, and that would be
published/subscribed as normal. It didn't make sense to me to include an
extra collection for this because presence information is already
associated with each user (versus sessions, for example.)


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-29771766
.

@samim23
Copy link
Author

samim23 commented Dec 4, 2013

@dburles i´ve been testing your new code for an evening and works nicely, except for "ghost" users that get stuck in the system for hours even though nobody is there. happens only sporadically, only reboot seems to work as a fix.

@mizzao
Copy link

mizzao commented Dec 4, 2013

@dburles Take a look at meteor/meteor#1552 to make sure you are using upsert correctly; if you don't include $set then it will just ignore the key you entered, possibly causing the ghosting.

@dburles
Copy link
Collaborator

dburles commented Dec 4, 2013

@mizzao thanks. looking into it more, i can cause ghost users to appear by refreshing the browser rapidly while logged in. also, strangely the socket close event fires twice on the same id for logged in users.

@dburles
Copy link
Collaborator

dburles commented Dec 6, 2013

Hey so i'm pretty confident i've now corrected the ghosting issue, the one i mentioned above. So assuming that this was causing the same problems that you were seeing @samim23 hopefully it will now no longer happen! It would be great if you could try it out and let me know if there are any issues @samim23. Make sure you grab it from here: https://github.com/dburles/meteor-presence

@samim23
Copy link
Author

samim23 commented Dec 6, 2013

@dburles super cool! i´ve just uploaded your new version to my production server. Not much testing yet but will give you proper feedback soon.

@dburles
Copy link
Collaborator

dburles commented Dec 6, 2013

thanks, appreciated!

@samim23
Copy link
Author

samim23 commented Dec 6, 2013

@dburles So i´ve done some testing today, two issues: Ghosts still can appear even though far less frequent. Unfortunately it stopped tracking non-logged in users completely which is bad for my usecase.

@dburles
Copy link
Collaborator

dburles commented Dec 6, 2013

@samim23 hey yeah sorry about that, I was doing a lot of testing with logged in users. I need to figure out how to write tests for this! I've patched it up now so just grab the code again from dburles/presence. If you don't mind, when you are seeing ghost users, could you show me what they appear like in the collection?

@samim23
Copy link
Author

samim23 commented Dec 7, 2013

@dburles i´ve just uploaded your most recent patch but now in my server stats the project average response time went from somewhere around 100ms to over a value of 150000ms. Evil ! As i did not change much else, i´m asking myself if this could be related to your update at all? I´ll look into making a snapshot of my collection asap and sending it over.

@dburles
Copy link
Collaborator

dburles commented Dec 7, 2013

Hmm I'm not sure how that correlates with the changes made. Wonder if
something else has gone askew. Very strange. Possible to trace down the
problem?

On Sunday, 8 December 2013, samim wrote:

@dburles https://github.com/dburles i´ve just uploaded your most recent
patch but now in my server stats the project average response time went
from somewhere around 100ms to over 150000ms which seems to be presence
related. I´m going from bad to worse with this solution :-( I´ll look into
making a snapshot of my collection asap and sending it over.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30060314
.

@samim23
Copy link
Author

samim23 commented Dec 7, 2013

I apologize as it seems to be just a snafu random correlation with my host going insane exactly after my upload. Now looking into making a custom output page, showing everything in the presence collection, will share that URL with you asap.

@gabrielhpugliese
Copy link

So it's nice to use now ?

Gabriel Pugliese
CodersTV.com
@CodersTV

On Sat, Dec 7, 2013 at 9:12 PM, samim [email protected] wrote:

I apologize as it seems to be just a snafu random correlation with my host
going insane exactly after my upload. Now looking into making a custom
output page, showing everything in the presence collection, will share that
URL with you asap.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30067971
.

@dburles
Copy link
Collaborator

dburles commented Dec 7, 2013

I believe so! Give it a try, some real world testing is good :)

On Sunday, 8 December 2013, Gabriel H Pugliese wrote:

So it's nice to use now ?

Gabriel Pugliese
CodersTV.com
@CodersTV

On Sat, Dec 7, 2013 at 9:12 PM, samim <[email protected]<javascript:_e({}, 'cvml', '[email protected]');>>
wrote:

I apologize as it seems to be just a snafu random correlation with my
host
going insane exactly after my upload. Now looking into making a custom
output page, showing everything in the presence collection, will share
that
URL with you asap.


Reply to this email directly or view it on GitHub<
https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30067971>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30068914
.

@dburles
Copy link
Collaborator

dburles commented Dec 7, 2013

@gabrielhpugliese if you want to try it, make sure you grab it from https://github.com/dburles/meteor-presence

@gabrielhpugliese
Copy link

Do you mean https://github.com/dburles/meteor-presence/ ?

Gabriel Pugliese
CodersTV.com
@CodersTV

On Sat, Dec 7, 2013 at 9:32 PM, David Burles [email protected]:

@gabrielhpugliese https://github.com/gabrielhpugliese if you want to
try it, make sure you grab it from https://github.com/dburles/presence


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30069628
.

@dburles
Copy link
Collaborator

dburles commented Dec 7, 2013

@gabrielhpugliese yep

@samim23
Copy link
Author

samim23 commented Dec 9, 2013

@dburles did a intensive test with around 30 users over the course of a day. The ghosting issue is indeed still present, user will show up in the presence collection even though nobody is there. An additional new issue is, that sometimes users who are online in a room, wont be counted at all - leading to to low user count. Let me know how i can help to resolve these issues.

@dburles
Copy link
Collaborator

dburles commented Dec 9, 2013

Would it be possible to pinpoint any areas that may trigger the ghost users? HCR? login/logout? etc
The ghost users within the collection, do they have a userId? and also when you say that the users are not counted, this could potentially also be an issue with your subscription/publication? I'm not sure. Any info you can dig up would be really helpful. Thanks :)

@samim23
Copy link
Author

samim23 commented Dec 9, 2013

  • The ghost users do have userIDs (I´m checking from the browser console) and look normal except that not all users in the the collection have a "state" field (where the "online" and my "roomID" are stored).
  • Really hard to pinpoint trigger areas as i´m testing with a live service.
  • Users not being counted is only occurring since the recent updates of presence & i didn´t change the pub/sub´s. I´ll be inside a room and it will show 0 users online, funny business ;)
  • Will try to dig up more infos, not so easy ;-)

@samim23
Copy link
Author

samim23 commented Dec 11, 2013

Quick update on the "user is in room but counter shows 0" issue. It seems like this occurs after a client is inactive for a while but remains in room/browser open/computer not sleeping. The disappearing users still show up in the overall presences counter though, just the field data gets lost. Not sure if this helps.

@gabrielhpugliese
Copy link

That is really bad for me since my app is a platform for long videos :(

Gabriel Pugliese
CodersTV.com
@CodersTV

On Wed, Dec 11, 2013 at 7:53 PM, samim [email protected] wrote:

Quick update on the "user is in room but counter shows 0" issue. It seems
like this occurs after a client is inactive for a while but remains in
room/browser open/computer not sleeping. Not sure if this helps.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30368000
.

@dburles
Copy link
Collaborator

dburles commented Dec 13, 2013

Hey Gabriel there are some changes coming in the next version of meteor
that should allow us to track user sessions in a much nicer way, so I'm
going to give that a try soon.

On Friday, 13 December 2013, Gabriel H Pugliese wrote:

That is really bad for me since my app is a platform for long videos :(

Gabriel Pugliese
CodersTV.com
@CodersTV

On Wed, Dec 11, 2013 at 7:53 PM, samim [email protected] wrote:

Quick update on the "user is in room but counter shows 0" issue. It
seems
like this occurs after a client is inactive for a while but remains in
room/browser open/computer not sleeping. Not sure if this helps.


Reply to this email directly or view it on GitHub<
https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30368000>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30483682
.

@gabrielhpugliese
Copy link

Yeah. I'm going to stick with my own method. I just upgraded to 0.6.6.3. If
you want to try here's the link:
https://github.com/gabrielhpugliese/meteor-users-counter

Gabriel Pugliese
CodersTV.com
@CodersTV

On Fri, Dec 13, 2013 at 1:30 AM, David Burles [email protected]:

Hey Gabriel there are some changes coming in the next version of meteor
that should allow us to track user sessions in a much nicer way, so I'm
going to give that a try soon.

On Friday, 13 December 2013, Gabriel H Pugliese wrote:

That is really bad for me since my app is a platform for long videos :(

Gabriel Pugliese
CodersTV.com
@CodersTV

On Wed, Dec 11, 2013 at 7:53 PM, samim [email protected]
wrote:

Quick update on the "user is in room but counter shows 0" issue. It
seems
like this occurs after a client is inactive for a while but remains in
room/browser open/computer not sleeping. Not sure if this helps.


Reply to this email directly or view it on GitHub<

https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30368000>

.


Reply to this email directly or view it on GitHub<
https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30483682>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30483873
.

@dburles
Copy link
Collaborator

dburles commented Dec 13, 2013

Yeah that's cool. The goal here is to not have to rely on polling so user
presence changes are realtime. Hopefully this new feature may solve these
bugs

On Friday, 13 December 2013, Gabriel H Pugliese wrote:

Yeah. I'm going to stick with my own method. I just upgraded to 0.6.6.3.
If
you want to try here's the link:
https://github.com/gabrielhpugliese/meteor-users-counter

Gabriel Pugliese
CodersTV.com
@CodersTV

On Fri, Dec 13, 2013 at 1:30 AM, David Burles <[email protected]<javascript:_e({}, 'cvml', '[email protected]');>>wrote:

Hey Gabriel there are some changes coming in the next version of meteor
that should allow us to track user sessions in a much nicer way, so I'm
going to give that a try soon.

On Friday, 13 December 2013, Gabriel H Pugliese wrote:

That is really bad for me since my app is a platform for long videos
:(

Gabriel Pugliese
CodersTV.com
@CodersTV

On Wed, Dec 11, 2013 at 7:53 PM, samim <[email protected]<javascript:_e({}, 'cvml', '[email protected]');>>

wrote:

Quick update on the "user is in room but counter shows 0" issue. It
seems
like this occurs after a client is inactive for a while but remains
in
room/browser open/computer not sleeping. Not sure if this helps.


Reply to this email directly or view it on GitHub<

https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30368000>

.


Reply to this email directly or view it on GitHub<

https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30483682>

.


Reply to this email directly or view it on GitHub<
https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30483873>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30485223
.

@gabrielhpugliese
Copy link

Would save our lives :)

Gabriel Pugliese
CodersTV.com
@CodersTV

On Fri, Dec 13, 2013 at 2:17 AM, David Burles [email protected]:

Yeah that's cool. The goal here is to not have to rely on polling so user
presence changes are realtime. Hopefully this new feature may solve these
bugs

On Friday, 13 December 2013, Gabriel H Pugliese wrote:

Yeah. I'm going to stick with my own method. I just upgraded to 0.6.6.3.
If
you want to try here's the link:
https://github.com/gabrielhpugliese/meteor-users-counter

Gabriel Pugliese
CodersTV.com
@CodersTV

On Fri, Dec 13, 2013 at 1:30 AM, David Burles <[email protected]<javascript:_e({},
'cvml', '[email protected]');>>wrote:

Hey Gabriel there are some changes coming in the next version of
meteor
that should allow us to track user sessions in a much nicer way, so
I'm
going to give that a try soon.

On Friday, 13 December 2013, Gabriel H Pugliese wrote:

That is really bad for me since my app is a platform for long videos
:(

Gabriel Pugliese
CodersTV.com
@CodersTV

On Wed, Dec 11, 2013 at 7:53 PM, samim <[email protected]<javascript:_e({},
'cvml', '[email protected]');>>

wrote:

Quick update on the "user is in room but counter shows 0" issue.
It
seems
like this occurs after a client is inactive for a while but
remains
in
room/browser open/computer not sleeping. Not sure if this helps.


Reply to this email directly or view it on GitHub<

https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30368000>

.


Reply to this email directly or view it on GitHub<

https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30483682>

.


Reply to this email directly or view it on GitHub<

https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30483873>

.


Reply to this email directly or view it on GitHub<
https://github.com/tmeasday/meteor-presence/issues/17#issuecomment-30485223>

.


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30485338
.

@mizzao
Copy link

mizzao commented Dec 19, 2013

@samim23 @gabrielhpugliese and @dburles In meteor-user-status am also (rarely) observing imaginary users being online after long periods of inactivity. It seems that the socket.on("close", ...) event must not be triggered.

Meteor 0.6.7 seems to give us the option to get out of this mess. Unfortunately, it doesn't keep track of IP addresses, yet. I think I will submit a PR for that :)

@gabrielhpugliese
Copy link

My users-counter package is not presenting ghost users :)

Gabriel Pugliese
CodersTV.com
@CodersTV

On Thu, Dec 19, 2013 at 6:53 PM, Andrew Mao [email protected]:

@samim23 https://github.com/samim23 @gabrielhpugliesehttps://github.com/gabrielhpuglieseand
@dburles https://github.com/dburles In meteor-user-statushttps://github.com/mizzao/meteor-user-statusam also (rarely) observing imaginary users being online after long periods
of inactivity. It seems that the socket.on("close", ...) event must not
be triggered.

Meteor 0.6.7 seems to give us the option to get out of this mess.
Unfortunately, it doesn't keep track of IP addresses, yet. I think I will
submit a PR for that :)


Reply to this email directly or view it on GitHubhttps://github.com//issues/17#issuecomment-30965407
.

@mizzao
Copy link

mizzao commented Dec 29, 2013

I just had a moment of clarity about this bug while washing dishes.

At least some of the problem in this package and also in meteor-user-status is the fact that the SockJS close event isn't fired when people sleep their computers, at least not for several hours. Sometimes it just isn't fired ever. This may be due to an older version of SockJS that Meteor is using or just something that isn't fixed yet, but I'm pretty sure this is the issue that's causing these ghost users.

@samim23
Copy link
Author

samim23 commented Dec 29, 2013

@mizzao makes sense, thanks for the pointer. Has anybody had the chance looking into the new meteor "facts" package? might solve our issues

@dburles
Copy link
Collaborator

dburles commented Jan 8, 2014

hey guys, i've decided to add a heartbeat here to deal with sleeping/unclosed sockets by maintaining a server side list of connected clients alongside a tick method.

I currently don't have any real-world apps to properly test this over time with so any help with that is really appreciated, thanks.

The updated presence package can be found over here: https://github.com/dburles/meteor-presence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants