[FX.php List] 5 minute timeout?
Andrew Denman
adenman at tmea.org
Tue Aug 29 11:47:34 MDT 2006
David,
There is a similar setting in IIS. I'm seeing it under the "Web Site" tab
under a site's properties window. I don't know what the default is, but
mine's currently at 900 seconds.
IMHO section:
Though this option is there, I think you're on the right track with your
periodic flush. It seems like the keep-alive setting could affect server
performance and since you're only using it on one (or a few) pages of your
website, it would be better to do what you can through coding instead.
Andrew Denman
-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Marisa Smith
Sent: Tuesday, August 29, 2006 12:27 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] 5 minute timeout?
David-
I'm not sure if you are using Apache or not, but if so you might want
to look at your timeout settings there. I had this problem a while
back and had to tweak some stuff in the httpd.conf file. I think
the default "keepalive" connection is something like 300 seconds,
which would explain your 5 minute timeout issue. You can check this
out by printing the results of phpinfo() and looking at the apache
timeouts area. Unfortunately, I don't have time to look up the exact
setting right now, but thought this might be helpful.
Marisa
On Aug 29, 2006, at 11:52 AM, David Ness wrote:
> Dale, thanks for the suggestion.
>
> Moving the 'set_time_limit' outside the loop had no effect. Also, I
> see
> that I was mistaken in my belief that the log error quoted below was
> thrown upon 'timeout'. It isn't. The error came from some other
> condition not related to this problem.
>
> During my latest test, the 'timeout' did occur, and the php error log
> remained clear.
>
> I'm re-reading the additional comments on
> http://us2.php.net/set_time_limit and I think the solution is
> there. You
> can't leave a browser waiting for new data for 5 minutes. I'm going to
> try some solutions which involve flushing output to the browser
> periodically. Something like:
>
> ob_start();
> While loop
> {
> Do the things that take a log time
> echo ".";
> flush();
> ob_flush();
> }
>
> I'll report back later after trying a few potential solutions.
>
>
> --
> David Ness,
> Database Systems Programmer
>
> Bonded Builders Warranty Group
> 1500 Kings Highway
> Port Charlotte, FL 33980
> 800.749.0381 x3123 (National Toll Free)
> 941.255.3274 x3123 (Local)
>
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Dale
> Bengston
> Sent: Tuesday, August 29, 2006 11:20 AM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] 5 minute timeout?
>
> Hi David,
>
> Try using set_time_limit at the top of the html page being loaded
> instead of within the while loop. I think it's designed to work per-
> script, not per-iteration of a loop.
>
> Regards,
> Dale
>
> On Aug 29, 2006, at 10:12 AM, David Ness wrote:
>
>> My fx.PHP solution has a feature where the user can 'batch upload'
>> data
>> to a FileMaker table using a properly formatted csv file. I've got
>> everything working great, except I can't get the page to stop timing
>> out after 5 minutes. I get about 320 records posted (of a test set of
>> 1000), then the script stops, throwing the following error to the php
>> error
>> log:
>>
>> [29-Aug-2006 10:53:48] PHP Warning: fsockopen() [<a
>> href='function.fsockopen'>function.fsockopen</a>]: unable to connect
>> to 10.10.10.4:80 (A connection attempt failed because the connected
>> party did not properly respond after a period of time, or established
>> connection failed because connected host has failed to respond.
>>
>> 10.10.10.4 being my FM WPE.
>>
>> The basic structure of the php code is:
>>
>> $handle = fopen("uploadedfilename.csv", "r"); while (($importdata =
>> fgetcsv($handle, 0, ",")) != FALSE) {
>> set_time_limit( 50000 );
>> $newApplication->AddDBParam('builder_reference_number',
>> $importdata[0] );
>> $newApplication->AddDBParam('builder_number', $importdata[1] );
>> $newApplication->AddDBParam('homeowner_firstname',
>> $importdata[2] );
>> $newApplication->AddDBParam('homeowner_lastname', $importdata[3]
> );
>> $newApplicationResult = $newApplication->FMNew(); } // end of
> while
>> fclose($handle);
>>
>>
>> As you can see, I've tried playing around with the usual subjects;
>> max_execution_time, max_input_time, and set_time_limit.
>>
>> My ini info is located at:
>> http://www.bondedbuilders.com/builderportal_development/phpinfo.php
>>
>>
>> I use a MS IIS v6 server, and don't see any options there (though I'm
>> not ruling out the solution being there), and I also wondered if the
>> solution lies in placing some statement in the HTML HEADER of the
>> page,
>> which I haven't found.
>>
>> If you know of any potential solutions to this timeout problem,
>> please
>> offer them up!
>>
>> Thanks!
>>
>> --
>> David Ness,
>> Database Systems Programmer
>>
>> Bonded Builders Warranty Group
>> 1500 Kings Highway
>> Port Charlotte, FL 33980
>> 800.749.0381 x3123 (National Toll Free)
>> 941.255.3274 x3123 (Local)
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
More information about the FX.php_List
mailing list