Re: Looking for ways to prevent timeout
| From: | Nathan Nobbe | Date: | Mon, 05 Nov 2007 02:53:19 +0000 |
| Subject: | Re: Looking for ways to prevent timeout | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-264037@lists.php.net to get a copy of this message | ||
On 11/4/07, Jon Westcot <jon@westcot.net> wrote:
>
> Hi all:
>
> I'm hoping to find a solution to the problem I'm having with my script
> timing out while inserting records into a table.
>
> Overall, the process is pretty fast, which is impressive, but when it
> gets to the 22,000 to 23,000 record mark, it seems to time out. I've had it
> get up over 26,000 so far, but nothing better than that. And I only need to
> process around 30,000 right now.
>
> I've tried setting max_execution_time to 1800; no improvement. The
> value for max_input_time is -1, which, if I understood it correcctly, is the
> same as saying no limit. And I've tried calling set_time_limit() with both
> 0 and with 360, none of which seemed to help.
>
> Is there ANY WAY to increase the amount of time I can use when running
> a script that will work? I've tried everything I can find in the PHP
> manual.
>
> Any help you can provide will be greatly appreciated!
are you familiar with ajax ?
i would build some client side tool that would split the job into a series
of requests.
say, you input 20,000; then the script fires off 5 requests, to do 4000
inserts a piece.
you could easily implement a status bar and it would be guaranteed to work.
also, it would scale just about as high as you can imagine.
-nathan