Re: Disconnect database connection after idle timeout
Perrin Harkins <[email protected]>
| Newsgroups | gmane.comp.apache.mod-perl |
|---|---|
| Message-ID | <CAC0_be2O52d63tor9Jt51EVnw1FQPoF6wEEyOH57VMNUZMjSqw@mail.gmail.com> |
On Thu, Nov 13, 2014 at 12:21 PM, Vincent Veyron <[email protected]> wrote: > Nobody suggested using connect_cached, where the documentations says : > > The cached database handle is replaced with a new > connection if it has been disconnected or if the "ping" method fails > > Would that not solve OP's problem? Well, Apache::DBI should already be doing a ping and a successful re-connect if needed. If that isn't working with Apache::DBI, there's no reason to think it will work better with connect_cached. Also, Apache::DBI has some additional things in it (avoiding caching connections during startup, protection from dangling transactions at the end of a request) that might be needed. - Perrin