what happens when an infinite loop occurs on a server?
on my local machine, WinXP + WAMP5, i get a Fatal Error something abt max execution time of 30secs exceeded on a real server what implications does it have?
what happens when an infinite loop occurs on a server?
Moderator: General Moderators
-
iceangel89
- Forum Commoner
- Posts: 39
- Joined: Mon Jul 02, 2007 7:02 pm
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Actually, when this happens in real life, the Earth's rotation slows just a bit and the gravitational imbalance brings us closer to the sun.
In reality, it would have everything to do with your server settings. If you are on a hosted server, it would probably die in about 30 seconds. If it is your own server, and you tweaked the settings... well, fasten your seatbelt because it might be getting a little warmer around here.
In reality, it would have everything to do with your server settings. If you are on a hosted server, it would probably die in about 30 seconds. If it is your own server, and you tweaked the settings... well, fasten your seatbelt because it might be getting a little warmer around here.
- Josh1billion
- Forum Contributor
- Posts: 316
- Joined: Tue Sep 11, 2007 3:25 pm
Re: what happens when an infinite loop occurs on a server?
As the others said, same thing usually.iceangel89 wrote:on my local machine, WinXP + WAMP5, i get a Fatal Error something abt max execution time of 30secs exceeded on a real server what implications does it have?
-
iceangel89
- Forum Commoner
- Posts: 39
- Joined: Mon Jul 02, 2007 7:02 pm
ok thanks just dont want to crash servers. remote ones. someone(http://nicheserver.com) kindly gave me free hosting so dont want to cause him any trouble, crashing servers. lol.
but just curious during the 30secs what happens 100% CPU usage? won't that be bad still?
but just curious during the 30secs what happens 100% CPU usage? won't that be bad still?
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
An infinite loop for 30 seconds will not be so bad and provided your loop isn't building a stack or something which uses a lot of memory the only impact will be a slowdown on the server. If you're really concerned then you can get away with a 5-10 second time limit in most scripts which don't do any heavy work on remote connections.
Code: Select all
set_time_limit(5);