1
Grover
Who's Online is acting oddly
  • 2005/3/24 17:17

  • Grover

  • Just popping in

  • Posts: 61

  • Since: 2005/2/13


This morning, when I logged in Who's Online reported traffic as follows. Wierdly, I appeared 4 times at 64.180.167.126, once logged in and 3 times as Anonymous users. The site was incredibly slow as well. Other, non-xoops content at the same address loaded briskly. Any idea what's going on?

I'm using XOOPS 2.0.9.2 and haven't made any major changes recently.

Quote:

Anonymous (64.180.167.126)
Anonymous (64.180.167.126)
Anonymous (64.180.167.126)
neko (64.180.167.126)
Anonymous (24.19.174.162) Classified Ads

2
DonXoop
Re: Who's Online is acting oddly

Don't use cache for the Who's Online block, that can cause problems with it. You might go into System/Preferences/General and hit Go. This will clean up the cache. You should check your settings in case you have settings that might slow things down (like keeping Update Module... set to Yes).

3
JamesSAEP
Re: Who's Online is acting oddly
  • 2005/3/24 19:56

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


I had the same problem and this fixed my problem:

Quote:

For a small traffic site like xoops-tips.com, the Who's Online block does not accurately update and show who are really online. It will keep showing users as being online long after they have logged off.


The Who's Online block uses a 'garbage collector' function to clear and update the block, based on a pre-set frequency. The default value is set to 10% and this is to reduce the number of queries to the database. This means 1 in 10 chances, the block will get updated when you click/refresh your pages.

For a busy site like xoops.org, the 10% frequency works just fine. For a small site, you will keep seeing people online even though they have logged off long time ago because the block has not got updated.

A minor tweak/modification will increase the frequency and more accurately show Who's Really Online.

File affected: /modules/system/blocks/system_blocks.php

locate


// set gc probabillity to 10% for now..
if (mt_rand(1, 100) < 11) {
$online_handler->gc(300);
}

change value 11
if (mt_rand(1, 100) < 11)

to a higher value like 70, 80 or 90 (the busier your site the lower the value, so you don't really burden your server)
if (mt_rand(1, 100) < 70)


4
Grover
Re: Who's Online is acting oddly
  • 2005/4/1 5:14

  • Grover

  • Just popping in

  • Posts: 61

  • Since: 2005/2/13


That did the trick Jimbo and seems to have cleared up another problem I was having too After logging in the site would still think I was a guest and boot me back out of areas that Guests can't enter. Second log in attempt always worked but it was annoying. Thanks, it's nice to have both issues behind me.

5
JamesSAEP
Re: Who's Online is acting oddly
  • 2005/4/1 18:56

  • JamesSAEP

  • Just can't stay away

  • Posts: 732

  • Since: 2005/2/28


No problem.

J

6
sesj78
Re: Who's Online is acting oddly
  • 2005/4/11 5:24

  • sesj78

  • Just popping in

  • Posts: 3

  • Since: 2005/4/6 1


Hey there...
I followed all of the instructions you all posted in this thread, but I'm still having problems with logging in.

No matter what I try, I seem to always have to login twice. The first time it appears to have signed me in, then I click on something and it boots me off. The second time I sign it, it works great.

The steps you posted on here definitely helped with the Who's Online issue I was having. I'm just not sure how to fix this other prob.

Thanks for any help you can offer.

7
m0nty
Re: Who
  • 2005/4/11 6:30

  • m0nty

  • XOOPS is my life!

  • Posts: 3337

  • Since: 2003/10/24


the who's online block has nothin to do with stoppin u logging in..

the likely culprit would be your domain url in mainfile.php

if you're using http://yourdomain.com 1st and when u hit login check the url again and if it shows as http://www.yourdomain.com, then that's the problem.. make sure the url matches by editing mainfile.php to include the www or vice versa..

Login

Who's Online

121 user(s) are online (97 user(s) are browsing Support Forums)


Members: 1


Guests: 120


heyula,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits