Hello,

I'm debugging why I'm getting 'server closed the connection
unexpectedly' intermittently in a modperl application.

Unfortunately it has only been seen on the production server and not on
our development server making it harder to debug.

On the database side, nothing looks unusual in the load or the logs, so
I'm suspecting there is a fix on the modperl side.

I am using Apache::DBI, and have identified a couple of aspects which
might be "special" in this part of the application:

1. The db handle is being used inside of a Data::FormValidator
constraint. From what I've read, it seems possible that the handle is
suffering some "trapped in a closure" effect. However, we use constructs
like this throughout the site without a problem, so I doubt this is
where the issue is.

2. In a couple related modules we a construct like: "our $DBH = 
DBI->connect()". 
We don't do that elsewhere in the application. With some effort we could
refactor the code to get rid of this. I tried switching to "local our",
but I got a test failure. (Although I didn't get to the bottom of why
that test failed before reverting). 

Usually we pass the handle around through the CGI::Application object,
and that works fine. 

I'm interested to know: Does it seem like I am even looking in the right
place to troubleshoot this? General suggestions?  

    Mark

Reply via email to