|
#1
|
|||
|
|||
|
Hi all,
I run a PHP script which adds products to a MySQL db. The script finds new products to add in batches, and adds them in batches. However, since transferring the script to hostgator, the script stops running randomly, usually at the beginning of one of the batches being injected to the db. Since this never happened before when I hosted the scripts from WAMP/LAMP, I am guessing there is some kind of memory or timeout issue occurring. Can anyone help or offer ideas? Thanks! |
|
#2
|
|||
|
|||
|
I just deduced that the "interruption" is occuring exactly between these two lines:
include_once('mysql.php'); $mysql = new MYSQL(); I am still baffled as to why this line is stopping the script... |
|
#3
|
||||
|
||||
|
First of all, there should be no problem whatever with a properly coded PHP script adding any reasonable number of records to a MySQL table. I run such a script on my shared server that adds 108,731 geoIP records in just a few seconds.
Scripting logic suggests that the failure is occuring with attempted execution of the include_once instruction. And that, in turn, suggests that either it isn't finding what it's trying to include or else some aspect of the include file itself is corrupting the process. |
|
#4
|
|||
|
|||
|
Turns out hostgator kills any connections that take longer than 30 seconds.. The default timeout is 8 hours. I am filing a ticket right now to increase the limit to something reasonable (I need at least 5minutes for some scripts). I will keep you all posted.
|
|
#5
|
||||
|
||||
|
Huh?! If its timing out following an "include_once" instruction as per your original post, that must be one heck of an include file.
Not sure where you think you're gonna get a PHP max_execution_time setting of 8 hours or anything like that, but I'm willing to bet that HG won't even consider 5 minutes. |
|
#6
|
||||
|
||||
|
Quote:
8 hours for a script on any server ..... still not likely. 30 seconds is the default, not 8 hours. My bet is that HG will tell you to fix your script or move to a dedicated server. From the ToS: Quote:
__________________
- David |
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Anyone know a script like this? | DannyD | Off-Topic | 5 | 09-27-2008 01:31 PM |
| Running a python script just gives me the txt of the script | Meridian66 | Shared Hosting Support | 14 | 07-16-2007 09:05 PM |
| PHP Sessions Randomly Lose Variables | wisewolfe | Pre-Sales Questions | 1 | 08-21-2004 09:55 AM |
All times are GMT -5. The time now is 10:15 PM.










