BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.2 support => Topic started by: Aesgaard on July 11, 2007, 08:39:53 pm

Title: Error
Post by: Aesgaard 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
Title: Re: Error
Post by: porter 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";
Title: Re: Error
Post by: Alreadythere on July 11, 2007, 09:49:31 pm
Sounds like you have some trouble connecting to Vhab's server.
Title: Re: Error
Post by: Khalem 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.
Title: Re: Error
Post by: Aesgaard on July 12, 2007, 07:02:33 am
Should I upgrade from 0.2.11 to 0.3 ? will that fix this ?
Title: Re: Error
Post by: Alreadythere 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.
Title: Re: Error
Post by: Aesgaard 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 ?
Title: Re: Error
Post by: Alreadythere 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.
Title: Re: Error
Post by: Aesgaard on July 12, 2007, 03:17:03 pm
I better just clear it :P
Title: Re: Error
Post by: porter 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.
SimplePortal 2.3.7 © 2008-2024, SimplePortal