#9878: Database backend leaves idling connections when used in multiple threads
---------------------------------------------------+------------------------
          Reporter:  Fredde                        |         Owner:  nobody
            Status:  closed                        |     Milestone:        
         Component:  Database layer (models, ORM)  |       Version:  1.0   
        Resolution:  invalid                       |      Keywords:        
             Stage:  Unreviewed                    |     Has_patch:  0     
        Needs_docs:  0                             |   Needs_tests:  0     
Needs_better_patch:  0                             |  
---------------------------------------------------+------------------------
Changes (by mtredinnick):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 The particular example you give is not the way Django is used, however.
 So, yes, if you do something to deliberately create lots of connections,
 lot of connections will be created. However, Django closes its connection
 to the database at the end of each request/response cycle, so there is
 only one connection in operation per thread or process handling requests
 and responses. If you're not using the HTTP layer, it's still only one
 connection per thread of execution and you are in complete control of the
 number of threads you create.

 So there's not really any Django bug here. The connection usage is
 predictable and controlled.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9878#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to