Re: Browser displays blank page, while request still being handled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 8, 2006 4:49 am, Rolf Wouters wrote:
> I don't think it's a timeout issue on the server-side, because I've
> already tried setting MAX_EXECUTION_TIME and MAX_INPUT_TIME to
> extremly
> high values, and got the same result (i.e. the blank page).
> By setting them to extremly low values I was able to verify the
> app/script/server 's behaviour when it did timeout, and that produced
> the expected warning-message for MAX_EXECUTION_TIME exceeded.

It probably isn't timeout on the server-side.

But your BROWSER has a hard-coded limit on how long it's willing to
wait for a slow server.

You cannot do anything about it.

If your script is taking THAT long to run, you have to do some
operations asynchronously -- which is just as well, as no user wants
to sit there with their browser open waiting for stuff to happen.

>> Copy has to wait until it's finished before telling you the results.
>> If it's copying a 20M file, that takes a while.. If you're copying
>> multiple 20M files, then hey.. there's you're problem. How many and
>> how big are the files in this case?
> We're talking about multiple copy operations.  The first one copies
> 230
> files (approx. 40mb) and the second one copies about 2200 files
> (195mb).  Most files are under 400kb a piece.
> The request shouldn't generate any output untill it is completely
> finished.  In between different operations, all message are stored in
> a
> string-variable.  At the end of the publish-request, another request
> (show_result) is called, and the result-string is placed into
> $_REQUEST,
> like this:
>
> $_REQUEST["result"] = &$result;

Take my previous paragraphs above and make them much more assertive
and remove all traces of doubt. :-)

Your script is taking WAY too long for a web-environment.

Don't do that. :-)

>> You might be better off running a script to run through cron every 5
>> minutes or so and doing it all for you.. then getting it to email
>> you
>> the results.
>>
> Running the script through cron wouldn't be a good idea.  The app
> we're
> talking about is a kind of Content Management System for
> photographers,
> so the publish-request should only be called when the user has
> finished
> his modifications to the site and is ready to publish them to his
> website.

You're going to have to adjust your thinking...

The user should be allowed to stack up the things they want done, and
GO AWAY and do something useful while you muck with all those files.

Later, much later, at the user's convenience, they should be able to
view what got done, and make a "go / no-go" decision on publishing --
or possibly just be notified that their decision from "earlier" has
finally been implemented.

Because there ain't no way a professional photographer wants to sit
there glued to the screen while you muck about with thousands of
files.

They've got photo shoots to do, calls to make, proofs to review, files
to organize, and lives to live.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux