Re: [cx-oracle-users] Connection pooling for website
Brought to you by:
atuining
From: Jani T. <re...@lu...> - 2006-08-31 05:50:43
|
Anthony Tuininga kirjoitti: > I am not aware of any way of sharing any Oracle connection between > multiple processes. I'm not that familiar with coding in Apache but I > do know that there are ways of indicating that you want one process to > handle the request which would allow you to use a connection pool. Of > course, then you are into threading which has its own set of > issues.... :-) There is way to do this, but it's nothing to do actually with cx_oracle, but generic Python coding. If you're running Python as CGI, you're out of luck, since it's single process (well not entirely true but quite close) per call. If you're using mod_python, you've more luck with it since it's persistent instance of your app that is running. One simple (generic) connection pooling that I know is implemented in Trac system see <http://trac.edgewall.org/browser/trunk/trac/db/pool.py> N.B.: Trac was my first reason to get interested in cx_oracle... :) -- Jani Tiainen |