Intresting the wording does say run out of safe mode OR change the value in php.ini. I wonder if your number is just too big, it's about 1900 years !. Just try a qute big number like 3600 to get it to run for an hour, or set it to 0 which is infinite.
Setting to 0 also conked out with "CGI Timeout". I changed in my Win 2000 box the "Connection Timeout" from 900 secs to 9900 secs, although this figure deals with an inactive user situation, whereas I make sure I'm spitting out output to the browser to forestall the server from thinking my app is inactive.
Well Connection Timeout has nothing to do with my continuing timeouts. I raised the timeout integer to billions and nothing doing! There MUST be a way to get the thing to process till I'm done. And I'm only 1/3 done by the time I timeout!
It doesn't really matter; I'd say it should take 10 minutes. I'm creating an array. As it gets bigger and bigger, the seek to discover if the next element I wish to add to the array is in the array already - also takes longer and longer. I'm creating a "dictionary" of unique words found in a few volumes of literature.
I've perused the internet and found many such dilemmas but not yet found the CURE!
What I'm getting at is how long does it actually run for before it times out. I wonder if your actual code is doing odd stuff to the PHP run time, if your adding and adding to an array you might be giving the memory managment elements a run for thier money !
I don't get it. I don't want the program to sleep. I want it to go ahead and process.
As to the period of time before it conks out, it's about 7 minutes or so. I only know what key it's on when it dies, which is about 1/3 of the way through the array. It'll vary somewhat.
We now know it runs for about 7 seconds,
Is this in the browser ?, does it give an error message ?,
Can you try running it from the command prompt, you often get some more diagnostics given which can get lost in the browser, for example it is not running within a web server.
I'm convinced something is going wrong in your code!, if you have set the limit to 0, it should go on forever.
Good idea; I tried running the app via IE6 and Firefox.
They both gave roughly the same output before giving me this error:
"key HTTP/1.1 502 Gateway Error Server: Microsoft-IIS/5.0 Date: Mon, 21 Jun 2004 16:42:15 GMT Connection: close Content-Length: 186 Content-Type: text/html
CGI Timeout
The specified CGI application exceeded the allowed time for processing. The server has deleted the process."
I also tried giving the app more memory to play with
memory_limit = 20M
but that only slowed the other processes running at the time.
Rather than trying to run the script from the browser, create a "launcher" script which schedules a "processor" script to run immediately under the scheduler service (or at daemon, whichever is appropriate) using the "at" command.
The processor script can then do its business undisturbed by web timeouts and send you an email when it's done.
Thanks sleipnir214. It's just that I have no idea how to create a launcher script, nor a processor script, nor have I ever used WIN 2000's scheduler service for that matter.
Could you help me out here?
By the way - ingresman - it's about 7 mins not secs. I watched the task manager while the app was running and it looks like the app was given 4 minutes of CPU time.
Sleipnir214 - I now see how to schedule a task.
ControlPanel -> ScheduledTasks -> Add ->
but here I'm stuck because I don't know what "program" to select to run.
Your "launcher" simply schedules the other script using the Win32 "at" command -- it lauches the other script. Issuing "at /?" at a command prompt or searching the Win32 help system can tell you lots about that command. From your launcher script, you'll use either exec() or the backtick operator to invoke "at".
And you've already written your "processor" script -- it's the script you can't get to run to completion. Strip off any output code lines, add an invocation of mail(), and you're there.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.