in reply to DB session usage is double the number of Maxclient in Apache
It looks like line 42 of your code opens a second DB connection per process.
Oh, wait...