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 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 tested it with MySQL running Python 2.3 and Python 2.4 using simulated >load (http://openwebload.sourceforge.net/). We need testers for >PostGreSQL (both Python 2.4 and Python 2.3). > I tested it on Postgres with trunk code. It definitely does what it's intended to do: threads don't close other threads connections anymore. 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. So after like 30 seconds of load Postgres fed up with open idle connections and began spitting fatal errors. I'll try to test it with magic-removal also... This is really a separate issue. I tested my old working patch and it does now the same thing (though it reaches max connections a bit slower). Eugene can you confirm this with MySQL? Just logging opening and closing connection would be enough to see the effect. >I didn't find a ticket for SQLite. I remember we had some conversation >about it, but I cannot find it anymore. Given all that I didn't touch >SQLite and ADO/MSSQL. > > I think you should also do this for every backend the same way you did for Postgres. The problem is not backend specific: if one thread says connection.close() while the other is doing something with it then the whole thing will certainly blow under any backend :-). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers -~----------~----~----~----~------~----~------~--~---