collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Reconnect  (Read 13372 times)

0 Members and 3 Guests are viewing this topic.

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Reconnect
« on: March 06, 2007, 12:18:52 pm »
Stupid problem, related to my stupid ISP. My ISP disconnects me every day after 24h to change my IP address. If I am logged in normally with the AO client, I crash and have to log back in. The bot reconnects as well, but takes ages. Well, not ages, but almost 10 minutes. If I just stop it and restart it, it's back up in a matter of seconds.
Question: Why does the bot take so long to realize it has been disconnected, and is there a way for me to speed this up?

Yes, I know, a "real" server with a fixed IP-address would be the obvious solution, but I have yet to find an affordable german provider of a server with root access that allows me the same freedom I have on my 'lil linux box at home.
Luuv  Bot-Keeper of Vengeance ^^*

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Reconnect
« Reply #1 on: March 06, 2007, 12:23:03 pm »
The bot likely doesn't notice it lost connection.
The "status" of tcp connections only update when data is sent or received, because of this it usually just remains in "waiting for data" mode without noting there won't be any data cause the connection is gone.
this could be fixed by adding a 'ping' to bebot that sends a ping packet through the connection every 60 seconds or so.

Offline Brianich

  • BeBot Rookie
  • *
  • Posts: 18
  • Karma: +0/-0
  • Kingpin Fixer
Re: Reconnect
« Reply #2 on: March 07, 2007, 09:16:56 am »
Well, original version of bebot, running on windows not reconnecting after disconnects (couse it set pause on terminal window), i fixed this problem only after replacing some files.
Super "Fixbrian" Girl
RK1, Clan
Current project: No data avaible...

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Reconnect
« Reply #3 on: March 07, 2007, 04:49:04 pm »
Stupid problem, related to my stupid ISP. My ISP disconnects me every day after 24h to change my IP address. If I am logged in normally with the AO client, I crash and have to log back in. The bot reconnects as well, but takes ages. Well, not ages, but almost 10 minutes. If I just stop it and restart it, it's back up in a matter of seconds.
Question: Why does the bot take so long to realize it has been disconnected, and is there a way for me to speed this up?

Yes, I know, a "real" server with a fixed IP-address would be the obvious solution, but I have yet to find an affordable german provider of a server with root access that allows me the same freedom I have on my 'lil linux box at home.

I take it, you have reduced the time before attempted reconnect option in bot.conf?

-jj-

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Reconnect
« Reply #4 on: March 07, 2007, 11:33:48 pm »
uhm.... nope. Did you see that I started my ramblings with the word "stupid"?  ;D

What is a sane value here? It is set to 60 right now. But if these are seconds... it takes way longer than one minute for the bot to realize it has lost the connection. More like several minutes.
Luuv  Bot-Keeper of Vengeance ^^*

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: Reconnect
« Reply #5 on: March 08, 2007, 12:22:32 am »
No idea ;-p  I think it is seconds tho.

$reconnect_time = 1;             // Time to wait for auto reconnect after an error has accured.

My setting :-)

-jj-

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Reconnect
« Reply #6 on: March 08, 2007, 04:16:59 am »
Thanks, will try that. :)
Luuv  Bot-Keeper of Vengeance ^^*

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Reconnect
« Reply #7 on: March 10, 2007, 12:06:14 am »
Reconnect time only comes into play after the bot is actually disconnected.
In this case, the bot simply isn't disconnected yet.

Basically what happens is that your ISP is disconnecting you, PHP is unaware of this and thinks everything is fine and dandy until the point where the bot tries to send some data on it's own initiative (which currently never happens iirc) or the connection actually times out due to lack of activity. Although im not sure if this timeout occurs in PHP, Windows or your router/modem.

I guess one could do some sort of ping, but i'd be weary of adding say 1 ping a minute doing for example a char lookup on the bots name simply because these things add up quickly. When you get anywhere from 200-2000 bots (i have noooooooo idea how many BeBots are out there), these pings every minute quickly add up.
BeBot Founder and Fixer Kingpin

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Reconnect
« Reply #8 on: March 10, 2007, 02:54:16 am »
Easiest thing will prolly be to catch it on side of the linux box and just kill and restart the bot whenever I reconnect. Or get another ISP, considering that as well atm. :)
Luuv  Bot-Keeper of Vengeance ^^*

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Reconnect
« Reply #9 on: March 10, 2007, 10:06:02 am »
I guess one could do some sort of ping, but i'd be weary of adding say 1 ping a minute doing for example a char lookup on the bots name simply because these things add up quickly. When you get anywhere from 200-2000 bots (i have noooooooo idea how many BeBots are out there), these pings every minute quickly add up.
No need for a char lookup, there's an actual ping packet intended for this purpose.
You'll even get a pong back.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Reconnect
« Reply #10 on: March 11, 2007, 01:56:22 am »
Any official guidelines on the frequency of the pings?
BeBot Founder and Fixer Kingpin

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Reconnect
« Reply #11 on: March 11, 2007, 09:34:18 am »
not that I know off.
It's a really small packet, just the header and no data.
I think about a minute is ok.

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: Reconnect
« Reply #12 on: March 12, 2007, 02:05:21 am »
now, how would I do that? where would I have to look, anyway?
Luuv  Bot-Keeper of Vengeance ^^*

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Reconnect
« Reply #13 on: March 12, 2007, 06:58:10 am »
now, how would I do that? where would I have to look, anyway?
It's actually something BeBot devs should be doing and releasing :P

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 437
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal