L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 12:44:12 AM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Support for older versions > BeBot 0.2 support > Topic: Reconnect
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Reconnect  (Read 775 times)
0 Members and 1 Guest are viewing this topic.
pusikas
Experienced
****
Offline Offline

Posts: 161


Reconnect
« on: March 06, 2007, 06:18:52 AM »

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.
Logged

Luuv  Bot-Keeper of Vengeance ^^*
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Reconnect
« Reply #1 on: March 06, 2007, 06:23:03 AM »

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.
Logged
Brianich
Freshman
*
Offline Offline

Gender: Male
Posts: 18


Kingpin Fixer


Re: Reconnect
« Reply #2 on: March 07, 2007, 03: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.
Logged

Super "Fixbrian" Girl
RK1, Clan
Current project: No data avaible...
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Reconnect
« Reply #3 on: March 07, 2007, 10:49:04 AM »

Quote from: pusikas on March 06, 2007, 06:18:52 AM
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-
Logged
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Reconnect
« Reply #4 on: March 07, 2007, 05:33:48 PM »

uhm.... nope. Did you see that I started my ramblings with the word "stupid"?  Grin

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.
Logged

Luuv  Bot-Keeper of Vengeance ^^*
jjones666
BeBot Contributor
Champion
*******
Offline Offline

Posts: 353


Re: Reconnect
« Reply #5 on: March 07, 2007, 06:22:32 PM »

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-
Logged
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Reconnect
« Reply #6 on: March 07, 2007, 10:16:59 PM »

Thanks, will try that. Smiley
Logged

Luuv  Bot-Keeper of Vengeance ^^*
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Reconnect
« Reply #7 on: March 09, 2007, 06:06:14 PM »

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.
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Reconnect
« Reply #8 on: March 09, 2007, 08:54:16 PM »

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. Smiley
Logged

Luuv  Bot-Keeper of Vengeance ^^*
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Reconnect
« Reply #9 on: March 10, 2007, 04:06:02 AM »

Quote from: Khalem on March 09, 2007, 06:06:14 PM
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.
Logged
Khalem
BeBot Founder
Administrator
Grandmaster
********
Offline Offline

Gender: Male
Posts: 670



WWW
Re: Reconnect
« Reply #10 on: March 10, 2007, 07:56:22 PM »

Any official guidelines on the frequency of the pings?
Logged

BeBot Founder and Fixer Kingpin
Madman coder and destroyer of good code
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Reconnect
« Reply #11 on: March 11, 2007, 03: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.
Logged
pusikas
Experienced
****
Offline Offline

Posts: 161


Re: Reconnect
« Reply #12 on: March 11, 2007, 08:05:21 PM »

now, how would I do that? where would I have to look, anyway?
Logged

Luuv  Bot-Keeper of Vengeance ^^*
Vhab
BeBot Contributor
Experienced
*******
Offline Offline

Posts: 158


WWW
Re: Reconnect
« Reply #13 on: March 12, 2007, 12:58:10 AM »

Quote from: pusikas on March 11, 2007, 08:05:21 PM
now, how would I do that? where would I have to look, anyway?
It's actually something BeBot devs should be doing and releasing Tongue
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Support > Support for older versions > BeBot 0.2 support > Topic: Reconnect
« previous next »
 
Jump to:  

Recent
[request] Raid timers
by Elesar1
[December 01, 2008, 04:41:09 PM]

Shared DB online list
by Temar
[December 01, 2008, 01:55:47 AM]

relay colors
by Temar
[December 01, 2008, 01:54:56 AM]

BeBot v0.6.0 released
by Alreadythere
[November 30, 2008, 05:32:00 PM]

Change to Bid.php
by Temar
[November 30, 2008, 11:41:44 AM]

OnlineOrg
by Jiheld
[November 29, 2008, 12:44:27 PM]

Silly Newbie Question.
by Temar
[November 29, 2008, 12:00:02 PM]

massive_pvp_time_table 1
by gerborg
[November 29, 2008, 06:55:35 AM]

Bot not see Guild Chat
by Delvar
[November 28, 2008, 08:30:34 AM]

Starting Bot
by Allisande
[November 28, 2008, 07:08:21 AM]
Stats
Members
Total Members: 1243
Latest: Whackoeng
Stats
Total Posts: 11144
Total Topics: 1505
Online Today: 21
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 2
Guests: 19
Total: 21
Temar
Elesar1

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.204 seconds with 29 queries. (Pretty URLs adds 0.032s, 4q)
Loading...