in reply to Sharing database connections over multiple (non child) processes.

As others have pointed out, you can't really share DBI handles between processes. The easiest thing to do by far would be to spend a few dollars on more RAM for your database server and keep on using lots of connections. However, if you really need to limit your connections you can use DBD::Proxy for this. It's slow, but it works.

Another approach is to use Apache/mod_perl as an application server, putting your core code in there and calling it from clients via SOAP or RPC-XML. This would let you limit the number of connections at any given time by controlling the number of Apache processes, but it also means a significant re-write of your code.

  • Comment on Re: Sharing database connections over multiple (non child) processes.