Problem With Immortals Idling out

Login to reply  Page: « < 1 of 1 > »
22 Feb 2010 - 03:342375
Problem With Immortals Idling out
For some reason that I cannot explain, Immortals on my MUD keep
getting timed out when their idle-timer reaches 8.

Coincidentally......
J) Tics before PC sent to void : 8
or is it?

Through output statements and observations, I have been able to
deduce the following two facts for *CERTAIN*:

1) The immortal is always in state CON_PLAYING when they are disconnected.
2) Mortals are not affected by this.

Strangely, it seems to be that if an immortal is continuously sent
a message via send_to_char(), they are not disconnected.

To clarify, when I made this change:
     update_char_objects(i);
      i->char_specials.timer++;
      if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL)
        check_idling(i);
+     else
+       send_to_char(i, "Your idle timer is at %d".\r\n", i->char_specials.timer);

Immortals stopped being disconnected.

But when I switched it to this:
     update_char_objects(i);
      i->char_specials.timer++;
      if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL)
        check_idling(i);
+     else
+       log("%s's idle timer is at %d.\r\n", GET_NAME(i), i->char_specials.timer);

The problem resumes.

I am somewhat halfway between Circle 3.1 and tbaMUD 3.6, and I have never heard of this happening before on either Circle or tba. Has anyone else?

PS. It has nothing to do with CONFIG_MAX_IDLE_LEVEL since this code
      if (GET_LEVEL(i) < CONFIG_IDLE_MAX_LEVEL)
        check_idling(i);
has the property that its second line is never executed since in my case,
CONFIG_IDLE_MAX_LEVEL = 101


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt

Last edited by Kyle (22 Feb 2010 - 03:38)
22 Feb 2010 - 05:182376
Update: It doesn't always disconnect at idle timer 8.

Sometimes it at other times near there, or not at all.

It's really confusing.


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt
22 Feb 2010 - 06:342377
New test: I changd SECS_PER_MUD_HOUR from 75 to 10, just to speed up my testing, and this is what I found:

Feb 22 01:43:57 :: Kyle's idle timer is at 44 and is in state 0.

Feb 22 01:44:07 :: Kyle's idle timer is at 45 and is in state 0.

Feb 22 01:44:17 :: Kyle's idle timer is at 46 and is in state 0.

Feb 22 01:44:27 :: Kyle's idle timer is at 47 and is in state 0.

Feb 22 01:44:37 :: Kyle's idle timer is at 48 and is in state 0.

Feb 22 01:44:47 :: Fizban force-rented and extracted (idle).
Feb 22 01:44:47 :: Kyle's idle timer is at 49 and is in state 0.

Feb 22 01:44:48 :: Losing descriptor without char.
Feb 22 01:44:57 :: Kyle's idle timer is at 50 and is in state 0.

Feb 22 01:45:07 :: Kyle's idle timer is at 51 and is in state 0.

Feb 22 01:45:17 :: Kyle's idle timer is at 52 and is in state 0.

Feb 22 01:45:27 :: Kyle's idle timer is at 53 and is in state 0.

Feb 22 01:45:37 :: Kyle's idle timer is at 54 and is in state 0.

Feb 22 01:45:47 :: Kyle's idle timer is at 55 and is in state 0.

Feb 22 01:45:57 :: Kyle's idle timer is at 56 and is in state 0.

Feb 22 01:46:07 :: Kyle's idle timer is at 57 and is in state 0.

Feb 22 01:46:17 :: Kyle's idle timer is at 58 and is in state 0.

Feb 22 01:46:27 :: Kyle's idle timer is at 59 and is in state 0.

Feb 22 01:46:37 :: Kyle's idle timer is at 60 and is in state 0.

Feb 22 01:46:37 :: nusage: 2   sockets connected, 1   sockets playing
Feb 22 01:46:41 :: Closing link to: Kyle, who is in state 0.

So 60 mud hours passed, at 10 seconds per hour, that makes 600 seconds.

Before, I would keep disconnecting at 8 mud hours, at 75 seconds per hour, that makes 600 seconds.

Axanon kept telling me he would disconnect at about 10 minutes real time, which makes 600 seconds.

I'll will post more info as I find it.


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt
22 Feb 2010 - 21:242378
Have you changed servers, updated your pc, or changed router lately?

This "you're disconnected after 10 minutes of inactivity"-thingy, is a very common phenomenon. Often it's router issue.

Since you're not likely to have changed this code at all, it's highly likely it's not code-related. It's just where you see the issue.


__________________
You know who I am.
22 Feb 2010 - 22:502379
My linksys wireless router has this issue, the only fix is a firmwire wipe and custom code that I decided wasn't worth the effort. I'll make sure my next router doesn't have a locked timeout, of course this one is going strong after 6 years.... go figure.

Is everyone having this idle out issue?


__________________
Rumble
The Builder Academy
tbamud.com 9091

Last edited by Rumble (22 Feb 2010 - 22:51)
22 Feb 2010 - 23:362380
It WAS only IMMs who where timing out, Kyle has changed something, and now mortals appear to be timing out just after they void. (but now after about 8 mins, not 10 like the imms). I guess if he sped up the game it would explain a few things: 1.) every time a mortal eats, they're hungry again within a few mins.. 2.) it will also disconnect them faster.

Originally, I thought that because it was Frostmud, and it is a free service.. maybe the guy was disconnecting idle sockets after 10 minutes, but it didn't make sense since mortals would normally stay connected much longer.. then again, a lot of the places where mortals would be in his game are OUTSIDE.

Well, I thought about it a bit, and if you are outside.. weather messages get displayed to the pc, even if you are immortal. It would make sense that if it was a matter of an idle socket getting disconnected for inactivity, something like a weather message would keep the connection from timing out. Much the same way that every tick, Kyle had a message getting sent to people about the # of idle ticks.

My next test would be, set the game back to it's original time settings, put a mortal character in-doors and see if they disconnect the same way an immortal would. I have a feeling you'll probably find that it's frostmud that auto-disconnects a socket after 10 mins if absolutely nothing gets sent to the player.

A fix might be as simple as every 2-3 ticks, tell the game to redisplay the prompt, or after X amount of time redisplay it.



Last edited by Axanon (22 Feb 2010 - 23:43)
23 Feb 2010 - 01:122383
I have been idling in a high-mob traffic room, outdoors for the past hour and a bit and have not been disconnected.


23 Feb 2010 - 01:322384
That would explain why the
send_to_char(i, "Your idle timer is now at %d.\r\n"...........);
stopped the disconnecting but the line
log("%s's idle timer is now at %d.", .........);
did not.

I am however not behind a router at all and I am experiencing the same issue.

Could it be that it's the ISP that does the connection killing?

Cheers,

Kyle


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt

Last edited by Kyle (23 Feb 2010 - 01:33)
23 Feb 2010 - 05:502385
You guys were right.

This is what I ended up doing:

- if (!(heart_pulse % PULSE_USAGE))
+ if (!(heart_pulse % PULSE_USAGE)) {
+   send_buttkick();  /* to prevent timing out */
    record_usage();
+  }

where

void send_buttkick(void)
{
  struct descriptor_data *d;

  for (d = descriptor_list; d; d = d->next) {
    if (IS_PLAYING(d))
      send_to_char(d->character, "@n");
  }
}

Then I got back 2 hours later and happily see:

Num Class     Name         State          Idl Login@   Site
--- --------- ------------ -------------- --- -------- ------------------------
  4 [104 Ber] Kyle         Playing          0 01:57:56 [s0106001e688b412e.ca.shawcable]
  2 [104 Cru] Axanon       Playing         91 00:19:28 [d72-39-26-115.home1.cgocable.n]

So thanks everyone for the help! Glad this is fixed.


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt

Last edited by Kyle (23 Feb 2010 - 05:51)
24 Feb 2010 - 21:362387
This way:

void send_buttkick(void)
{
  struct descriptor_data *d;

  for (d = descriptor_list; d; d = d->next) {
    if (IS_PLAYING(d))
      send_to_char(d->character, "@n");
  }
}

results in a prompt being duplicated every 5 ticks, which is pretty dumb from the player's perspective and looks a little bit sloppy.

The following is un-noticeable, but might cause garbled output for clients which don't support ANSI colour. However I've never heard of such a thing existing in this day and age, so I think this is safe?

void send_buttkick(void)
{
  struct descriptor_data *d;

  for (d = descriptor_list; d; d = d->next) {
    if (IS_PLAYING(d))
      write_to_descriptor(d->descriptor, KRNM);
  }
}


__________________
The Augmented Dimension 2.0
mud.themudhost.net port 5000

The Hidden Grotto
(Currently being patched up from Circle 3.0 to tba3.62)
Old version: a-d.codewarp.org 8229
Progress: http://a-d.codewarp.org/~schlittk/grotto_changelog.txt
Login to reply  Page: « < 1 of 1 > »