Hi Perrin,

I have seen in other web servers when apachectl starts, there is no "connect lost contact" error but it did happen when apachectl stops. If child process uses ping the inherited database handle and it is ping-able, then the child process may use it. That'll be a problem.

When child process exits, it calls rollback if AutoCommit is off, but when another new child process is just born and uses its connection to send database updates, will that rollback interfere with new child process attempt to update database? Is the rollback necessary?

Thanks,
- xinhuan

From: Perrin Harkins <pharkins@gmail.com>
Date: Tuesday, June 4, 2013 12:18 PM
To: Xinhuan Zheng <xzheng@christianbook.com>
Cc: Jim Schueler <jschueler@eloquency.com>, "modperl@perl.apache.org" <modperl@perl.apache.org>
Subject: Re: Apache::DBI "connection lost contact" error

On Tue, Jun 4, 2013 at 9:59 AM, Xinhuan Zheng <xzheng@christianbook.com> wrote:
> Will the new connection that's created be cached after then and the connection that's not ping-able will be discarded?

Yes.

> Will this cached the new connection last until the child process exit?

Yes, unless it times out on the Oracle side due to inactivity.

> Will rollback be called when child process discovers the connection handle not ping-able?

No, the connection is already closed at that point.

> Will rollback be called when child process exit?

Yes.

Also, I think I see how to fix this, so when I have a few minutes I'll send you a patch to try.

- Perrin