Jump to content

Script timing out?


toastyc12

Recommended Posts

I'm trying to run 5 php scripts that all run about ~200 MySQL commands each. The basic framwork is:

 

1.) Fetch a list of names from a table

2.) Names are put in an array, Loop starts

3.) For each name that is retrieved, it is matched with a name on a website (Echo for each name retrieved for logging purposes)

4.) the information retrieved from the website is stored in the table (using UPDATE)

5.) repeated for each name, until the end of the list is reached.

 

And it works, but seldom. When I run these in a web browser, some of the scripts that fetch a larger list of names from the table times out, whereas the shorter lists will succeed in a full update.

 

I've also tried setting these up as a Cron job (I'm using Hosting24 as my host), but the output is no better. The log shows that it runs about 8-9 names before stopping. No error, no nothing. Just end of log.

 

I've tried using  set_time_limit(); and have set it to 0 for unlimited, and even tried setting it really high (anywhere between 100 and 900 seconds), but to no avail.

 

Is there anything else I can do?

 

Link to comment
Share on other sites

You can check your php.ini file and make sure the timeout isn't too low there. Perhaps you don't have access to setting the set_time_limit() function.  I recommend you pull a <? phpinfo() ?> and see what the timelimit settings are.  You may also be having an Apache timeout as well, so you'll want to check out your apache config settings.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.