in reply to IPC::Open3::Simple closes database connection on error.

You won't have this problem on a Windows machine, since open3 spawns a child process instead of calling fork on those machines. That probably didn't help, but just in case.