in reply to DBI and DBD::mysql errors

If you fork before making any connections, you should be fine.

If you make a connection first and then fork, you probably have different children trying to share a single database connection. That's not going to work. What you may want to do is have the children clone the parent's database connection or use connect instead of connect_cached. Either way, the parent's database connection has to be disposed of properly in the child.

$parent_dbh->{InactiveDestroy} = 1; undef $parent_dbh;

There's an example in DBI, fork, and clone.