I'm running CP 3.0 behind mod_proxy and Apache. I have some
database-backed pages that may occasionally take an unexpectedly long
time to load, which will cause Apache to return a 502 Proxy Error if the
time is too long. I'm trying to diagnose a problem which appears to be
a side effect of a request that ends in a 502 from Apache and I'm
wondering if any of you good people can help.
The problem is that my CherryPy page handler appears to be terminated
with very extreme prejudice when the 502 occurs and doesn't get to
finish. It doesn't log any error message but also never logs the
request-status line showing the response code and response size. And no
code after the long-running database query appears to get executed.
That's no good for me, because there's database activity in progress and
I don't have the opportunity to do any cleanup of the DB connection
state.
So, what exactly happens within CherryPy when mod_proxy decides that
CherryPy is taking to long to respond? Do I just need to add a top-level
exception handler around all this code so I can run my cleanups? If so,
what exception am I looking for?
Thanks,
Bill Gribble