News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

User online statistics buggy?

Started by borish, January 19, 2014, 04:24:27 PM

Previous topic - Next topic

borish

Right now, my info center shows 1 guest, 10 members online. Below however, it claims: most online today: 2, most online ever: 2 (1st January). Strange. I use SMF 2.0.6.

Arantor

That's online over how long a period?

borish

I see: "Users online: 1 guest, 10 members. Active users in the last 60 minutes: ... (10 are shown)"

Arantor

Hmm.

I forget exactly how 2.0 grabbed that, but I do know that it is made inaccurate if that number is exaggerated because by setting that number that high, you're actually misrepresenting user online status.

If a user is shown as online in the forum (e.g. the little green/white block next to their name), they will be shown as online for an entire hour after they leave your forum (unless they explicitly log out) which is why we normally set it to 15 minutes (because they could just be reading a long thread and not refreshing)

borish


Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

That said there can be an issue with it not updating the stats properly if there's certain other conditions in play (like incorrectly configured server)

borish

I don't know how my host configured its server and I can't change this configuration.

But there's a mismatch between the "users online" counter and the "most users online" statistics. Right now, the info center shows 4 members online and also their names and I see 4 green bullets in the member list. Still, "most users online today" shows 2 and "most users online ever" also 2. This is faulty.

I don't know which forum setting I may have misconfigured. I set the login-cookie to expire in 60 minutes and I left the session expiration time at 2880 (I don't know how this differs from the login-cookie-time).

Arantor

The user online threshold, which is normally set to 15.

numbro

Can you provide a link to your site?

borish

Quote from: Sir Cumber-Patcher on January 20, 2014, 09:44:21 AM
The user online threshold, which is normally set to 15.
I set it to 15 some hours ago, but the problem persists. Besides, if I can set the user online threshold, SMF should work with whatever threshold I may choose.

borish

Same problem today. Different to this forum here, my forum shows "most online past 60 minutes". Don't know if the online threshold has anything to do with the problem.

borish

If there's no solution to the problem, how can I deactivate the "most online" display?

It's stuck at "most online ever: 2 (1st Jan 2014, 20:47)".

azasmith

It's never bothered me, and it probably won't help Borish get to the bottom of his issue, but I moved my SMF install to a new host in mid November, I had 141 members registered at the time. Standard procedure, export database, backup files, move over etc etc. When the transfer had completed and the site was live again, I had the following stat: Most Online Ever: 141 (12-11-2013, 16:39:16).

It seems it's counted all of my members as logged in at the time. Hopefully when I do actually get more than 141 logged in, the stat will update again. *fingers crossed*

EDIT: I've fixed it. Sort of. You have to reset the Most online ever counter. But it's now counting properly. To fix, log into your database via phpmyadmin. Scroll down the list on the side until you see smf_settings (assuming your tables are default smf_, find settings anyway. Click this, and scroll down until you see mostOnline (it was on page 2 for me) click edit and remove the number from the bottom box so the box is empty, then click Go.

Return to your forum, go to Admin > Maintenance > Forum Maintenance > Routine, and run Recount all forum totals and statistics.

What I posted above, now says the following: Most Online Ever: 4 (Today at 06:06:11) (So any views you had previously, it won't count. But it will count to more than 2. Which is always a Brucie Bonus!)

Usual warnings apply, make sure you have a recent backup of the db just in case you click the wrong thing or something. Follow the guide above and only remove the number from mostOnline and you'll be fine.  :laugh:

borish

#14
After I removed the mostOnline value in the db and run recount stats, the info center didn't show any numbers at all. Now I've remove mostOnline, mostOnlineToday and mostDate and run recount stats. It shows now
Am meisten online (heute): . Am meisten online (gesamt): (01 Januar 1970, 01:00)

Still bad. It appears that recount stats just retrieves the values from the db instead of calculating them.

Advertisement: