in reply to Sharing a database handle over multiple processes

The word I got from my local expert is that database handles do not survive a fork. So you will need to make a new connection in each new process.

Is this consistent with what others have heard/experienced.?

  • Comment on Re: Sharing a database handle over multiple processes

Replies are listed 'Best First'.
Re: Re: Sharing a database handle over multiple processes
by suaveant (Parson) on Jun 28, 2001 at 06:20 UTC
    Apache::DBI states that it creates all its DBI handles after the fork, since DBI handles would overwrite important info since SQL stuff through DBI is keyed off the handle... such as LAST_INSERT_ID and transactions, etc... so I agree with you wholeheartedly

                    - Ant