The issue with DBI and forking is this: You need to set
$dbh->{InactiveDestroy} = 1 in all of your child processes. Otherwise, when one child process dies it may kill database connections in other processes. (This is because as part of the DESTROY for the handle, it tells the databse server that it is done with the connection... even if there's another process that is not done with it)
Also be warned of the greater conceptual issue that you can only use a DB connection in one process. The connection may exist in other processes (hence the warning above about setting InactiveDestroy), but it can only be used in one.
Also, no, DBI is not threadsafe (unless this has changed recently... and that would be a big deal).
------------
:Wq
Not an editor command: Wq