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: Whois stops bot from responding  (Read 2755 times)

0 Members and 1 Guest are viewing this topic.

Offline KingJ

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Whois stops bot from responding
« 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
« Last Edit: April 23, 2006, 11:28:12 am by KingJ »

Offline Vhab

  • Contributor
  • *******
  • Posts: 180
  • Karma: +0/-0
    • VhaBot Forum
Re: Whois stops bot from responding
« Reply #1 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.

Offline KingJ

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Whois stops bot from responding
« Reply #2 on: April 23, 2006, 01:48:53 pm »
Hmm, well it seems to work now. Thanks for the information

Offline tabsl

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Whois stops bot from responding
« Reply #3 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.
« Last Edit: May 12, 2006, 09:53:09 am by tabsl »

Offline Xenixa

  • Contributor
  • *******
  • Posts: 307
  • Karma: +0/-0
Re: Whois stops bot from responding
« Reply #4 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.
<<< Hack's in Zend Studio

All my Custom Bebot files may be Found Here <-clicky

Offline tabsl

  • BeBot Rookie
  • *
  • Posts: 6
  • Karma: +0/-0
Re: Whois stops bot from responding
« Reply #5 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.  :-\


Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Whois stops bot from responding
« Reply #6 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.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Whois stops bot from responding
« Reply #7 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.
BeBot Founder and Fixer Kingpin

 

* 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: 108
  • 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