collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Connection problems causes bot to stop.  (Read 2209 times)

0 Members and 1 Guest are viewing this topic.

Offline Vallaroo

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Connection problems causes bot to stop.
« on: October 25, 2007, 12:09:29 pm »
Im running 0.42 on a windows machine, and start the bot by running startbot.bat.
If chatservers go down for more than about a minute or two, or i have internet connection problems for the same amount of time, the bot exits. It seems to loop the start/connection problems a few times, then exits the script.

The previous bot i used, would loop this process to no end untill it got connected, but bebot gives up after a few tries.

Anyone have some ideas as to what is wrong?

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Connection problems causes bot to stop.
« Reply #1 on: October 25, 2007, 02:38:45 pm »
It shouldn't give up.

StartBot.bat simply calls StartBot.php, which is an endless loop. All the loop does is start the bot every time it stops, until it ends in the line The bot has been shutdown.

I've never run into any trouble with the StartBot.php script. Only thing I can think of would be some limit on the number of system() calls a script may do that you got in your php config. Though I'm not even sure there is anything like that in php.

You can try the batch file below, it will loop endlessly over the bot script in adition to the endless loop in StartBot.php. That means you will have to hit Ctrl-C fast several times to stop the script at all or just close the shell every time you want to stop the bot.

Code: [Select]
@echo off
:top
php -c ./ StartBot.php %1
goto top

Offline Vallaroo

  • BeBot Rookie
  • *
  • Posts: 10
  • Karma: +0/-0
Re: Connection problems causes bot to stop.
« Reply #2 on: October 25, 2007, 06:31:35 pm »
After a few attempts it gives me this message;

<b>Fatal error</b>:  Maximum execution time of 30 seconds exceeded in <b>C:\xxx
\yyy\StartBot.php</b> on line <b>80</b><br />

Havent tried your batch script yet, ill do that tho.

Update: Tried your batch script, i still get the same error in there, but it start over, so it works.
« Last Edit: October 25, 2007, 06:36:18 pm by Vallaroo »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Connection problems causes bot to stop.
« Reply #3 on: October 25, 2007, 08:45:12 pm »
Looks like you are running a webserver version of php, no pure command line one. The webserver versions use a max execution timeout to make sure no bad scripts block the server. The scripts get aborted after the timeout and ressources freed. The html output points in the same direction.

 

* Recent Posts
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 ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 250
  • 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