Booya
collapse collapse

* User Info

 
 
Welcome, Guest. Please login or register.
Did you miss your activation email?

* Search


* Board Stats

  • stats Total Members: 1074
  • stats Total Posts: 18300
  • stats Total Topics: 2487
  • stats Total Categories: 7
  • stats Total Boards: 31
  • stats Most Online: 500

Author Topic: Error  (Read 4762 times)

0 Members and 1 Guest are viewing this topic.

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Error
« on: July 11, 2007, 08:39:53 pm »
Doing an !items 34 nano controller unit causes the bot to crash completely (all bots, not just mine, had Mr. P test it for me since mine didnt reply first time cause a massive "retrieval error" and made the bot lock up completely (not responding to !online etc.) after, wtb a fix please
-*tinkers*-

Offline porter

  • BeBot User
  • **
  • Posts: 28
  • Karma: +0/-0
Re: Error
« Reply #1 on: July 11, 2007, 09:12:20 pm »
You can't say "all bots" but I did try that !items request on one of my 0.2.11 bots (running the standard items module that came with it) and it stopped responding completely for a minute and 11 seconds, then it sent a tell "Unable to query database". It also only responded to any other events that took place during that time and two further !items queries that could not query database after spending just about exactly two minutes timing out on each of those subsequent queries.

Log shows no other errors. Bot did not crash and restart, just was slow and continued just fine after these queries.

I don't think it mattered what the !items query was. Haven't yet looked at the code but the other queries sent to the bot while it was frozen with the first one were quite different. Maybe the Central Items DB was unresponsive or offline...

EDIT: looked at the simple module and here we see that if the bot does not get a result from trying to retrieve the URL (which is the items request) it returns the above mentioned error message:
Code: [Select]
$result = file_get_contents($url);
if (!empty($result)) return $result;
else return "Unable to query database";
« Last Edit: July 11, 2007, 09:22:34 pm by porter »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Error
« Reply #2 on: July 11, 2007, 09:49:31 pm »
Sounds like you have some trouble connecting to Vhab's server.

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Error
« Reply #3 on: July 11, 2007, 10:55:22 pm »
The cause of this is that 0.2.x still uses file_get_contents which basically will cause the bot to freeze until a response is received, or the request times out. In which case you could end up loosing connecting to the AO chatserver due to inactivity.

With 0.4 being slated for release this weekend or so i don't really plan on looking into backporting 0.3.x items.
BeBot Founder and Fixer Kingpin

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Re: Error
« Reply #4 on: July 12, 2007, 07:02:33 am »
Should I upgrade from 0.2.11 to 0.3 ? will that fix this ?
-*tinkers*-

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Error
« Reply #5 on: July 12, 2007, 11:30:55 am »
Most devs are using the SVN version I think, and no longer 0.2.x.

So the chances of anything in the 0.2 branch getting fixed fast aren't the best.

That said - I don't know if moving to 0.3.5+ would solve the problem. Though I got no trouble using the items command in my bots.

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Re: Error
« Reply #6 on: July 12, 2007, 11:46:19 am »
I'll try upgrading, if not mistaken I need to redo the entire mysql db or delete it and build a new one for the 0.3+ build ? or would you reccomend waiting for 0.4 as Khalem said would probably be released this weekend ?
-*tinkers*-

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Error
« Reply #7 on: July 12, 2007, 12:18:20 pm »
There won't be any major changes till 0.4 anymore, only some error fixing and internal cleanup. Besides, with 0.3.4 we started to include automatic table updates where needed, which means even if some table changes till 0.4 (which is extremely unlikely), it will automatically update the schema on the next startup.

You'll need to redo quite a bit though, yes. Some things can be reused if you know how to rename SQL tables.
Just get a clean copy of 0.3.5 or 0.4 running, and check tables - if they got the same schema you can just reuse them.

Offline Aesgaard

  • BeBot Apprentice
  • ***
  • Posts: 82
  • Karma: +0/-0
  • .:.Alpha.:.
Re: Error
« Reply #8 on: July 12, 2007, 03:17:03 pm »
I better just clear it :P
-*tinkers*-

Offline porter

  • BeBot User
  • **
  • Posts: 28
  • Karma: +0/-0
Re: Error
« Reply #9 on: July 12, 2007, 09:31:02 pm »
By the way, as far as I can tell this was an anomaly, what I saw in the logs before and soon after the incident is extremely quick responses to any !items queries. We are also not even in the same country, Aesgaard and I, so the same timeout issue hitting us both would seem to indicate a problem somewhere closer to the items database server. Regardless, similar might of course happen again with the way this particular module queries the external database. I'm too busy IRL to upgrade right now but I also do not see it as a major problem currently.

 

* Recent Posts

0.7.0 updates by bitnykk
[May 17, 2020, 04:22:04 pm]


Stats module by bitnykk
[April 16, 2020, 04:45:43 pm]


OnlineOrg by Hell
[February 28, 2020, 11:21:55 pm]


AO Bots - discord server by Kjellis1234
[January 23, 2020, 04:17:04 pm]


Offline AA training timer module by Kjellis1234
[August 29, 2019, 11:12:14 pm]

* Who's Online

  • Dot Guests: 151
  • 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-2020, SimplePortal