GbxRemote - Error at Line 555?

Any problem ? Don't panic! We have the solution !

Moderator: TM-Patrol

Post Reply
User avatar
MCWulf
sunday driver
sunday driver
Posts: 73
Joined: 16 Nov 2005 22:14
Location: Germany
Contact:

GbxRemote - Error at Line 555?

Post by MCWulf » 16 May 2006 13:05

Hi everybody,

at the moment I am programming a script for my new Server, but now some **** happens... The script breaks after some minutes with the message:
Time exceeded(1000 seconds) in GbxRemote.php at line 555.
(Or something like this ^^)

Now... I looked into the GbxRemote-File.. But I dont know y he breaks always on this point...

Perhaps it has something to do with the callbacks, that I enabled...

Can someone give me a hint? :lol:

Thx very much!
MfG
MC Wulf | mofc.de

Board: DFI Lanparty UT NF4 Ultra-D
CPU: AMD Athlon64 X2 3800+
Graphic: NVidia GeForce 7800GTX
RAM: 4x Infinieon DDR2 1GB
OS: WinXP Pro SP1

Marck
happy cruiser
happy cruiser
Posts: 113
Joined: 19 Apr 2006 16:24
Location: Germany

Post by Marck » 17 May 2006 08:03

Most likely, you're running your script on a hosted server and most providers limit the maximum time that a PHP script is allowed to run. In your case, the limit seems to be 1000 seconds. The script is terminated in line 555 because in that line it sits and waits for incoming callbacks, i.e. it spends most of the time at this particular location in the script.

To resolve this issue, you either have to find a provider who allows unlimited runtime for scripts (e.g. rent a root server), or you run the script locally on your computer and access the dedicated server remotely over the internet.

User avatar
MCWulf
sunday driver
sunday driver
Posts: 73
Joined: 16 Nov 2005 22:14
Location: Germany
Contact:

Post by MCWulf » 17 May 2006 10:54

hm, in fact, i am running script and server on the same computer, and i set the timeout to 1000 by myself...

but how can i understand this? the script stays 1000 seconds at this line, without doing the loop once in this time? isnt this bad?
MfG
MC Wulf | mofc.de

Board: DFI Lanparty UT NF4 Ultra-D
CPU: AMD Athlon64 X2 3800+
Graphic: NVidia GeForce 7800GTX
RAM: 4x Infinieon DDR2 1GB
OS: WinXP Pro SP1

User avatar
TrabTowN
Pit Crew
Pit Crew
Posts: 789
Joined: 03 Nov 2005 14:30
Owned TM-games: TMS,tmn,TMU
Location: Ireland/orginal SACHSE^^
Contact:

Post by TrabTowN » 17 May 2006 11:38

sorry wulf.. it´s maybe a nooob awnser..
but it should not stay at that point for that long.. in fact we have set our timeout to 60 and its running smooth... the failure is maybe in the script that connects to the GbxRemote.php.... and 16,66 minutes is a bit long anyway... a track would be long time over... so simple, the script isnt doing the "loop"... or it has a problem to go on with it at that stage...
try to enable all error messages for the script... maybe you can see what is stoping the script at this point( maybe cant do the sql operation or some like this)
100²% addicted
Image
Image

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Post by Slig » 17 May 2006 13:47

MCWulf wrote:hm, in fact, i am running script and server on the same computer, and i set the timeout to 1000 by myself...

but how can i understand this? the script stays 1000 seconds at this line, without doing the loop once in this time? isnt this bad?
what timeout did you set in the readCB() call ? it should be a small timeout value (possibly 0 to return immediatly if there is no data to read) and be called at regular interval from your main loop.

User avatar
MCWulf
sunday driver
sunday driver
Posts: 73
Joined: 16 Nov 2005 22:14
Location: Germany
Contact:

Post by MCWulf » 17 May 2006 17:27

Slig wrote:what timeout did you set in the readCB() call ? it should be a small timeout value (possibly 0 to return immediatly if there is no data to read) and be called at regular interval from your main loop.
I set it to 5.... so i dont understand why it spends 1000 seconds or more to the while in the gbxremote....
MfG
MC Wulf | mofc.de

Board: DFI Lanparty UT NF4 Ultra-D
CPU: AMD Athlon64 X2 3800+
Graphic: NVidia GeForce 7800GTX
RAM: 4x Infinieon DDR2 1GB
OS: WinXP Pro SP1

Marck
happy cruiser
happy cruiser
Posts: 113
Joined: 19 Apr 2006 16:24
Location: Germany

Post by Marck » 17 May 2006 20:28

MCWulf wrote:i am running script and server on the same computer
Is this computer located at your home? Or is it hosted in some provider's computing center?
MCWulf wrote:but how can i understand this? the script stays 1000 seconds at this line, without doing the loop once in this time? isnt this bad?
The script doesn't spend all of the 1000 seconds on that while(readselect(...)) statement but rather the main part of that period of time while it frequently returns to this while loop.
If you had a look at the documentation of the readselect call, you would see that it waits on input and output. That is what most interactive programs do most of the time: Waiting for input to process. Hence, the propability of your program executing this particular call when it is terminated by some external instance after 1000 seconds is much higher than for any other statement of your program.

Let me emphasize this: I assume that not your script breaks but rather some external instance terminates your script because it exceeds some execution time limit. If you are running your script on some remote hosted computer, ask the hosting provider about such a runtime limit.

EDIT: As it seems, this behavior is a configuration option of PHP itself. (Siehe auch die entsprechende Erläuterung aus der de.comp.lang.php.* FAQ. Or confer to the relevant description at PHP.net.)

User avatar
Slig
Pit Crew
Pit Crew
Posts: 2124
Joined: 05 Sep 2005 17:51
Owned TM-games: ALL
Location: TraxicoLand (Fr)
Contact:

Post by Slig » 17 May 2006 21:19

what version of GbxRemote.inc.php are you using ?

in the version shipped with 03-10 dedicated, the $timeout = 0; just after the while() was missing, and possibly if some data came for example every 4s, with a 5s timeout the loop would never end... the version with 40-20b and 04-25 should be ok.

anyway, if you make a sleep in your main loop, i suggest to use a 0 timeout .

Post Reply