• Forum
  • Doc
  • Screenshots
  • Download
  • Donate
  • Contributors
  • Contact
  • Follow @phpfreechat
  • DEMO
  • Board index ‹ Version 1.x branch ‹ General Support (v1.x)
  • Change font size
  • FAQ
  • Register
  • Login

Session update interval goes berserk

Moderators: OldWolf, re*s.t.a.r.s.*2

Post a reply
5 posts • Page 1 of 1

Postby Error403 » Fri May 09, 2008 2:52 am

Hi,

When I'm idling for a while, the update intervals go from 2 seconds to 3, then 5, then NaNs or something like that. When that last value is displayed, it seems like the windows is trying to refresh every half second or so, then it finally loses the connection.

I tried putting the timeout to 300000 and other things, but it seems like all the changes I do in the general configs file are simply ignored, even if I do /rehash.

My only change is that I have to authenticate my users that are stored in a mysql database. They login using a unique userid and password, if successful the script fecthes the first name and family name then does

Code: Select all
param["nick"] = "$firstname $family_name";

Any ideas?
Also, is there any way or feature to make the browser's takbar button flash upon certain events to tell the user something needs its attention?

Thanks!
Error403
New member
 
Posts: 2
Joined: Fri May 09, 2008 2:39 am
Top

Postby OldWolf » Sat May 10, 2008 5:12 am

Well, if you're using get/post at all on the page, that's likely to cause errors. It's hard to give you a good answer without a link or the code. :)
Signature:
Read before Posting: Forum Rules
Note: I am unable to offer support through PM/e-mail at this time.
OldWolf
Site Admin
 
Posts: 1918
Joined: Sun Sep 23, 2007 5:48 am
Top

Postby Error403 » Sat May 10, 2008 11:40 am

Thanks.. I realized it was that get/post thing, and also the frozennicks parameter. The get/post was overloading the mysql server, and the frozennicks was making it refresh in very short intervals. That explained why the system processes went up 100% on the server.
Error403
New member
 
Posts: 2
Joined: Fri May 09, 2008 2:39 am
Top

Postby kriko » Mon Jun 01, 2009 2:01 am

This seems to happen in freshly installed scritp too - on 2 servers.
When it reaches the end of the array, client starts to "attack" server, instead of sticking
with last value.

For e.g. you can try to set delay steps to a shorter list:
Code: Select all
$params["refresh_delay_steps"] = array(2000,5000,5000,10000);

and wait 10 seconds - after that NaNs will be displayed.

It doesn't occur by default, because delay steps list is a bit longer, but if you wait till the end,
it will happen the same.
kriko
Member
 
Posts: 30
Joined: Sun May 31, 2009 8:07 pm
Top

Postby kriko » Mon Jun 01, 2009 2:09 am

...and I think this is the fix:
data/public/js/pfclient.js

replace calcDelay function with:

Code: Select all
  calcDelay: function()
  {
    var lastact = new Date().getTime() - this.last_activity_time;
    var dlist = this.refresh_delay_steps.slice();
    var limit;
    var delay = null;

    while (typeof (d = dlist.shift()) != "undefined")
    {
      var limit = dlist.shift();

      if (d < delay) continue;
      if (lastact > limit) delay = d;
    }

    if (delay == null) delay = this.refresh_delay;
    return delay;
  },
Last edited by kriko on Mon Jun 01, 2009 12:36 pm, edited 1 time in total.
kriko
Member
 
Posts: 30
Joined: Sun May 31, 2009 8:07 pm
Top


Post a reply
5 posts • Page 1 of 1

Return to General Support (v1.x)

Who is online

Users browsing this forum: No registered users and 32 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
cron
Sign in
Wrong credentials
Sign up I forgot my password
.
jeu-gratuit.net | more partners
Fork me on GitHub