This is the problem, I already found out the child processes automatically close the database connections of the parent but couldn't find a way to prevent this. Never noticed this attribute, but InactiveDestroy is the answer for this problem when using DBI and forking childs.
I've set the InactiveDestroy attribute to true on the parent's database handles and it runs smoothly now.