[CDBI] DB connection lost? Program ABENDs on PING?

Edward J. Sabol sabol at alderaan.gsfc.nasa.gov
Mon Feb 18 18:36:21 GMT 2008


> I have a small TCP daemon running (using Net::EasyTCP and
> Proc::Daemon). The daemon does some very simple interactions with a
> local database.

You realize you (probably) can't fork() with an open DBI connection, right?
Similar problems occur with threads, I believe. The simple solution is to not
connect to the database until after your fork(). If you must access the
database in the parent process before you fork(), then make sure explicitly
disconnect before fork()-ing any children.

> Is there a way I can either fix or investigate this further in CDBI?

Honestly, I doubt it has anything at all to do with Class::DBI.



More information about the ClassDBI mailing list