It's hard to tell what the problem is without seeing any code, but I'm guessing it happens as soon as you hit any child process the second time. It probably has to do with something being persistent that you didn't expect. Check it by running in single-process mode: httpd -X. It's probably not related to Apache::DBI or persistent database connections.