# disconnect all database handles my %drivers = DBI->installed_drivers(); my @all_dbh = grep { defined } map { @{$_->{ChildHandles}} } values %drivers; $_->disconnect for @all_dbh; # now use Parallel::ForkManager as usual foreach my $job (@work) { $pm->start and next; # do the fork # connect in the child $dbh = DBH->connect(...); $pm->finish; # do the exit in the child process } $pm->wait_all_children; # now safe to reconnect in the parent $dbh = DBI->new(...);