Long running script gets "black holed"

Giganews Newsgroups
Subject: Long running script gets "black holed"
Posted by:  fearlsgroove (matt.mo…@gmail.com)
Date: Sun, 27 Jul 2008

Warning: Apache newb here**
Let's say I've got an app that performs a long running operation like
processing and importing a csv file into a database. This app is setup
in such a way that it makes one request that kicks off the process,
which also drops status files in a temp dir. Meanwhile a script at the
browser runs additional ajax requests to check on how we're doing.

The problem is that if the initial request runs long enough they seem
to get "black holed." I dunno enough about apache to find what's
actually going on, but I've used http debuggers (Firebug, fiddler) to
gather this much. It seems that the process is suppsed to return that
initial request when the whole thing is finished. Since it never
returns, it just keeps doing it's ajax status update indefnitely.

The process is completing; I've verified that the imports are
complete. Also if I trim the import file small enough so that the
request finishes fast enough, all's well in the world.

This is a php process but I've eliminated php as the source of the
timeout. Max_execution_time and max_input_time are set quite high in
php to make sure they're not the problem. I've also reproduced this
issue using PHP as a DSO, CGI of FCGI with the same results.

I've tried making sure RLimitCPU is set to max as well as setting the
Timeout directive higher that would be needed. I'm not 100% sure
Apache is to blame, but it's the most accessible target I've got so
far.

Can anyone suggest another configuration setting that may be affecting
this?

Replies