Ivan Sagalaev wrote:
>
> It's not at all that simple in practice. You can't just leave the
> connection for later reuse because it holds the whole environment:
> transactions, locale settings, authentication, may be something else.
> Each bit of this environment should be handled separately:
>
>
Ivan Sagalaev wrote:
>It's not at all that simple in practice
>
I just recalled one more thing.
Cheap pooling (by just not closing connections) wouldn't let you control
separately lifetime and quantity of Apache child processes and open db
connections. And this is usually needed since these a
Eugene Lazutkin wrote:
>If I understood you correctly, you proposes to introduce new
>USING_THREAD_POOL setting. If it is set, we don't close connection
>hoping that it is going to be reused, if the thread itself was reused
>for other request. It leaves the connection open until thread dies and
>
张骏 wrote:
>
> Should we use the code
> """
> def close( self ):
> if setting.USING_THREAD_POOL:
> return
> else:
> self.connection.close()
> """
> instead of the oranginal "DatabaseWrap.close" function for
Ivan Sagalaev wrote:
>
> Though it mandates opening new connection for each request which would
> kill even "hello world" if it happens to use Oracle for backend :-).
> However this problem is better solved with some external connection pool
> solution.
I am all up for a generic connection po
Ivan Sagalaev wrote:
>>
> Found it. Both modpython.py and wsgi.py have this bit:
>
> try:
> request = ModPythonRequest(req)
> response = self.get_response(req.uri, request)
> finally:
> db.db.close()
>
> # Apply response middleware
> for middleware_method
在 2006-3-2 12:28:04,Eugene Lazutkin <[EMAIL PROTECTED]> 写道:
>
> I just posted patches (trunk and magic) for *Subj*. You can find details
> here: http://code.djangoproject.com/ticket/1442.
It's good and pythonic. I like the solution.
Should we use the code
"""
def close( self
Ivan Sagalaev wrote:
>However this patch revealed pretty nasty show-stopper bug: we leak
>connections somewhere. For even a simple view that does only a single
>select connection is opened, then closed and then opened again and never
>closed.
>
Found it. Both modpython.py and wsgi.py have this
Eugene Lazutkin wrote:
>I just posted patches (trunk and magic) for *Subj*. You can find details
>here: http://code.djangoproject.com/ticket/1442. It supersedes tickets
>#463, #900, and #1237. The fix was inspired by ticket #1268.
>
>
"class DatabaseWrapper(local)" looks nice :-)
Though it ma
I just posted patches (trunk and magic) for *Subj*. You can find details
here: http://code.djangoproject.com/ticket/1442. It supersedes tickets
#463, #900, and #1237. The fix was inspired by ticket #1268.
I tested it with MySQL running Python 2.3 and Python 2.4 using simulated
load (http://ope
10 matches
Mail list logo