|
RE: Maximum pool size considered harmful: msg#00074web.zope.zodb
[Jim Fulton, sketches a scheme to eliminate the max pool size, which later got fleshed out at http://zope.org/Wikis/ZODB/SimplifyConnectionManagement ] >> - Keep a weak-key dictionary (weak set?) of connections >> so we can do things like compute connection and >> cache statistics >> >> - Keep a stack of unused connections, for reuse >> >> - When someone calls open(), if the unused connection stack is >> non-empty, they'll get the connection from the top of the stack, >> otherwise they'll get a new connection. >> >> - When someone closes a connection, the connection will be >> added to the top of the stack. If the stack is over a maximum size, >> connections are discarded from the bottom of the stack (ie deck). [Martin Kretschmar] > but the implementation should be a little bit more > thread aware. Could you be more specific about what you mean, preferably phrased as a modification to what Jim described? > I once had hard to trace ODBC access violations under > load and after 1-2 days. The problem was a recycled > CDatabase object. After I gave every thread his "own" > object back, the problem was gone. What does this have to do with what Jim proposed? It may be obvious, but I don't see it (and neither did Jim <wink>). > Creating a session to an Oracle data base can also be > quite a pain, since it takes at least 5 seconds. So > it is a good idea to be able to keep sessions open > and at the same time being able to enforce their > closure. Similarly. If you need to keep using a specific ZODB connection, don't close it. It *sounds* like you want the implementation to guess something about your app, but I'm not sure what, or how it could be implemented. The stack-like behavior Jim described for connection recycling is intended to reuse ZODB caches effectively in common access patterns (like opening and closing a connection per request), and that's all. _______________________________________________ For more information about ZODB, see the ZODB Wiki: http://www.zope.org/Wikis/ZODB/ ZODB-Dev mailing list - ZODB-Dev@xxxxxxxx http://mail.zope.org/mailman/listinfo/zodb-dev |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | instant degree: 00074, Jimmy Shields |
|---|---|
| Next by Date: | 65< when?: 00074, Ericka Masters |
| Previous by Thread: | Re: Maximum pool size considered harmfuli: 00074, Martin Kretschmar |
| Next by Thread: | RE: Maximum pool size considered harmful: 00074, Jeremy Hylton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |