1
-FireHorse-
Who's Online Timeout

I notice after a few mins the online_uname field in the myxoops_online table refeshes and loses the data, I have made a module that access this info to permit users access to another module, however if they have been idle for more than a few mins they cannot gain access. Is there anyway I can increase the timeout of this system block to around 20 mins?

cheers
FireHorse

2
hervet
Re: Who's Online Timeout
  • 2006/2/12 10:17

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4



3
-FireHorse-
Re: Who's Online Timeout

Thanks Hervet, just what I was looking for.

I find it a bit odd that this sort of setting is left to chance

global $xoopsUser$xoopsModule;
    
$online_handler =& xoops_gethandler('online');
    
mt_srand((double)microtime()*1000000);
    
// set gc probabillity to 10% for now..
    
if (mt_rand(1100) < 11) {
        
$online_handler->gc(300);
    }


Being quite new to php I cant fathom if we can turn this into a time based system easily. sometimes I have many hits per hour and other I have none so this setup is a little too hit and miss for my liking, most visitors are coming to be involved in an event so right when I need the online stats to stay is most likly exactly when they wont.

would increasing the number in the microtime affect the random nature at all?

cheers
FireHorse

4
Herko
Re: Who's Online Timeout
  • 2006/2/12 20:04

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


it is because there is no way to trigger this event (update the whos online status) other then by call via a page that is loaded (which isn't time based, but event driven), or a cronjob, which would use more resources then strictly necessary.

Herko

5
wallyc
Re: Who's Online Timeout
  • 2006/3/19 0:45

  • wallyc

  • Just popping in

  • Posts: 5

  • Since: 2006/3/19


Is there anyway where we can make the refresh a button trigged event? (ie, put in a 'refresh' button that when clicked on will check exactly who is presently online).

6
hervet
Re: Who's Online Timeout
  • 2006/3/19 9:26

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


It will be an "excellent" way to overload a site.

7
wallyc
Re: Who's Online Timeout
  • 2006/3/19 11:39

  • wallyc

  • Just popping in

  • Posts: 5

  • Since: 2006/3/19


how much burden or overloading are we talking about when we put the % up to 70%? I just want an idea before I go ahead and modify the code.

Why would a click based trigger be an excellent way to overload a site?

8
codyheit
Re: Who's Online Timeout
  • 2006/3/20 4:52

  • codyheit

  • Not too shy to talk

  • Posts: 150

  • Since: 2006/1/10


It should be handy to have

I have just changed to 90 as only 7 people use my internal website.
www.sacotech.com.au

Login

Who's Online

148 user(s) are online (101 user(s) are browsing Support Forums)


Members: 0


Guests: 148


more...

Donat-O-Meter

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

Latest GitHub Commits