Is this a multi-threaded (or forked, even) application, by any chance? (e.g. using Apache) Are you sharing the database connection between threads (siblings)? Each thread(process) needs it's own database handle, otherwise it makes things very difficult.