Re: [CDBI] Class::DBI and mod_perl
Perrin Harkins <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
john drago wrote: > One thing I found was to ignore the documentation where it says to override the > db_Main method with your own. Don't do that. If you let Class::DBI handle the connections for you, you are likely to run into problems. It breaks the automatic safety rollback that Apache::DBI does for you after every request (very important if you use any transactions or table locks), and it keeps connections that you open during startup (maybe unintentionally, by doing a set_up_table() call) open across the apache fork, which will cause socket errors. That's why you get some broken connections after a restart. > That caused endless problems. If you could describe them, maybe someone here will know how to fix them. There are other ways to do it than the code shown on the wiki, but the standard Class::DBI approach is considerably less safe than Apache::DBI. - Perrin