BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.2 support => Topic started by: KingJ on April 23, 2006, 11:08:17 am

Title: Whois stops bot from responding
Post by: KingJ on April 23, 2006, 11:08:17 am
Hi,

I am running v0.32 of BeBot which I installed yesterday. However, it seems thast after a whois command is typed in the org chat, the bot stops responding. I can still see the Command Promt window with the last command. Eventually, about a minuite later it responds with "www.anarchy-online was too slow to respond", looking in the window which has now unfrozen and is updating the chat correctly I see this:

Quote from: Bot Window
[2006-04-23 09:04:09]   [GROUP] [MSG]   [Order of A new Dawn] Lonzid: whois lonz
id

Warning: fopen(http://www.anarchy-online.com/character/bio/d/1/name/lonzid/bio.x
ml): failed to open stream: HTTP request failed!  in b:\Anarchy Bots\oand_bebot_
beta\Bot.php on line 793

Warning: fgets(): supplied argument is not a valid stream resource in b:\Anarchy
 Bots\oand_bebot_beta\Bot.php on line 796

Anyone know why this happens? Even after it has unfrozen it wont respond to any commands and a manual reboot is required.

Edit: Rooster update completely crashes the bot and it never responds
Title: Re: Whois stops bot from responding
Post by: Vhab on April 23, 2006, 12:14:29 pm
It happens when FC's xml servers have issues (or when they are updating which is each morning).
The bot can only handle 1 request at a time so while it's waiting on FC's servers to respond it can't process other commands.
After the timeout it fails to do the whois and should continue.
However, I don't see why it entirely stops listening to commands, after the timeout it should continue to work as intended.
Title: Re: Whois stops bot from responding
Post by: KingJ on April 23, 2006, 01:48:53 pm
Hmm, well it seems to work now. Thanks for the information
Title: Re: Whois stops bot from responding
Post by: tabsl on May 12, 2006, 09:51:26 am
Where can i set the timeout to a lower time?  ???
This is really annoying because i think FC's xml server issues have increased last few weeks.
Title: Re: Whois stops bot from responding
Post by: Xenixa on May 12, 2006, 11:55:15 am
The timeout for the fopen() function that Bebot uses to get webpage info would need to be set in the php.ini file. Currently the setting for the time out isn't in the php.ini that comes with Bebot. PHP's default timeout for fopen() is 60 secs.

In other words... add this as a new line in your php.ini:
Code: [Select]
default_socket_timeout = 60
60 is the default as mentioned. You can set it lower but always use seconds.
Title: Re: Whois stops bot from responding
Post by: tabsl on May 12, 2006, 01:32:40 pm
Oh thanks a lot  ;D i hope the cashed whois module will reduce the timeout with time because i've no access to php.ini.  :-\

Title: Re: Whois stops bot from responding
Post by: Alreadythere on May 12, 2006, 04:10:38 pm
You do know that you can use custom php.ini files to overwrite a few settings of the global one? Not sure what's the safety around that, but mem-usage/modules work, think timeouts should be possible too.

And to the whois cache - it seriously saves http queries. I got over 80k entries in it now, and haven't noticed a single lookup-delay in almost forever.
Title: Re: Whois stops bot from responding
Post by: Khalem on May 13, 2006, 02:14:35 pm
The real permanent solution to this problem is two fold.

1) The addition of the whois cache (this is needed anyways to stop putting excessive load on the XML servers) which will reduce the amounts of external lookups the bot will have to do

2) A wrapper function with a decent timeout and if possible non locking which will eliminate this problem.
SimplePortal 2.3.7 © 2008-2025, SimplePortal