On Thu, Jan 21, 2010 at 04:28:30PM +0100, justin randell wrote: > hi, > > 2010/1/21 Peter Rundle <[email protected]>: > > I said it might take a few seconds, I didn't say it was computationally > > heavy. > > fair enough, but still worth questioning, i think. for a typical app, > i'd be concerned if a fat apache child process was spending more than > a quarter to a third of a second servicing a single request. >
We have a similar issue here at work, and for us it just creeped up on us. The code was written to deal with uploads and parse them / process them / stick bits into the database. As time goes by the uploads grow from kb to Mb and change from simple format to vast swathes of @#...@^ xml. The same job which used to take less than a few seconds now causes timeouts in apache which we've had to raise and/or the browser. Which we can't do much about. This is all in java so it's not too difficult to make it asynch wrt to the original http request. And leave the use perhaps with an ajaxy update page. I know next to nothing about PHP, but can't you spawn another thread unrelated to a client http request? Then you can finish this page, redirect them to another page which just waits for the result to come back - checking now and then via the db or some file on disk. Other respondents of cron fail (AFAICS) to satisfy the responsiveness that the original poster wants. Matt -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
