Mark Stosberg wrote:

> 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). 

I don't know if this is the root of you problems, but this seems like a
bad idea anyway. Depending on how you do this and where, ff you preload
this module it will open the db connection at server startup (which
isn't bad in and of itself). That handle will have to be closed after
startup is done. DB handles opened before the children are forked cannot
be used after the fork.

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

This seems like the better approach.

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

Is this a Pg or Apacahe error? Are you using Apache::DBI?

You might be ablet to reproduce the problem in your QA env if you run
the server in single process mode. This will make it easier to simulate
all of the children getting hit and serving requests.

-- 
Michael Peters
Developer
Plus Three, LP

Reply via email to