#565: Using models and turbogears AutoConnectHub with threads
-------------------------------------------+--------------------------------
Reporter: jpaulofarias at gmail dot com | Owner: anonymous
Type: defect | Status: closed
Priority: high | Milestone: 0.9
Component: TurboGears | Version:
Severity: critical | Resolution: worksforme
Keywords: |
-------------------------------------------+--------------------------------
Changes (by kevin):
* status: new => closed
* resolution: => worksforme
Comment:
OK, I've taken another look at the code. The sqlite hack I was referring
to was ''only'' being applied to sqlite. The latest version of SQLObject
fixes the problem with sqlite, so I'm removing TG's hack for this.
There is, in fact, pooling going on. Here's how it works:
* when a DB connection is needed, it tries to pull one from the pool
* if there isn't one, it creates a new connection to the DB
* as soon as it's done with the connection, it returns it to the pool
Connections in the pool are never closed. So, when you start up the server
there are no connections open to the database. The number of connections
that you'll have to the database will increase until you have one per
thread (if you're using all of your threads). I just tested this, and this
is in fact how it worked.
The description seems to imply that the number of DB connections just
keeps going up and up. I just tested with MySQL on my machine, running
repeated concurrent connections with ab and it was clearly reusing the
same database connections. It's possible that there was some problem
earlier, but as of today it's fine for me.
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/565>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" 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/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---