Odd user activity; always active within 1 minute

Hey all, I’ve got a user, who otherwise appears to be a normal, regular user and polite with it, who is always seen within 1m! 24/7!

Before I go querying this with him, has anyone seen such behaviour before? Might he be using some kind of browser addin to perpetually refresh the page whilst not in attendance?

He’s using Google Chrome.

I notice there are such add-ons for Google Chrome. Obviously given the client side notifications this is pretty pointless and wasteful.

Any way to discourage this aside from politely asking him to refrain? (So that I cover the general case, not just his)

I’m curious why having a perpetual “seen <1 minute” would be something that needed to be discouraged.

I can think of three reasons:

  • If the user is not in attendance:
    • the user will not receive Email notifications because the system will assume they are there
    • the statistic is meaningless and would confuse anyone who was trying to contact them

More to the point:

  • Wasteful of resources: the push model is there to optimise bandwidth and computing efficiency and assists greatly wth scalability. This rather renders that technology irrelevant which is rather stupid. The Discourse team can probably advise but a full page reload probably uses several orders of magnitude more bandwidth and server resources than push. Whilst one user doing this is probably no big deal, having 1000 users refreshing the page every minute whilst not even in attendance is surely going to adversely impact the load on the server. Hence a control would seem sensible.

Does this mean he is actually reloading the page, or would simply leaving a tab open already do this? I suppose that might still count as ‘last seen’?

It might be worth asking this user what’s up. One scenario that crossed my mind after reading this is someone leaving his computer on and going away on holiday or something like that. I wouldn’t be surprised if he has no idea that this is happening.

1 Like

I’m going to hazard a guess (and could be wrong) but to be “Seen” don’t you have to have initiated a server action within that time?

Indeed … though you’d hope for humanity’s sake the computer kit he uses goes to sleep or puts some processes to sleep to save energy after a short period of absence!

1 Like

Are you able to go through the server logs and see what requests he is making (based on IP address?)

1 Like

Yes I see an entry in Access.log for him every 30 seconds!

[25/Nov/2018:11:30:39 +0000] "www.example.com" 99.99.99.99 "POST /message-bus/47eca12686674ce7826d30996cdfeb27/poll?dlp=t HTTP/2.0" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36" "-" 200 379 "https://www.example.com/t/somepage/15015/46" 0.010 0.018 "-"

Suspicious, it’s not even the home page.

What’s weird is this is one Topic … hmmmmm … looks like he or more likely SHE might be trying to increase activity on this page (it’s advertising a paid support program masquerading as a recommendation)

I believe this user was trying to take the topic up the activity Top list! (and it was indeed quite a way up)

1 Like

No - those message bus requests are the background polling. If these are the only requests you are seeing, the user is just having his browser open and is not doing anything.

4 Likes

Thanks!

Then why is the user appearing as “Seen” … isn’t that a bit odd? Guess they must have browser open permanently … how odd … its been like this for days if not weeks!

This page was also pushing 1.1k views which is a little unusual for a page that’s not so old. Would this up page views?

1 Like

Message bus does not count as a vector for updating “seen”…

3 Likes

Oh so now I’m confused.

Btw what I did was move the topic into the Staff category and the user dropped off.

That to me feels like an active connection being cut.

I think it does, but only if the app sets Discourse-Visible=true:

pageVisible tries to check whether the browser window has focus:

This logic has massive impacts on the whos-online plugin, so I’ve spent a fair amount of time looking at it. There have been issues in the past with Firefox incorrectly setting the hasFocus parameter. From the user agent you posted above it looks like an up-to-date version of chrome, so that’s unlikely to be the issue.

My guess is that the user has left the tab open in the foreground, and has some weird screensaver/sleep configuration such that the tab never loses focus.

6 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.