On 09.10.2007 03:09 Graham Dumpleton wrote: [...] > their problems with consumption of resources may be getting > exacerbated by mod_python's module reloading mechanism. In short, the > engine object will be recreated every time the code file is changed > and reloaded. If this doesn't automatically release the connections > still in the pool, this may result any many pools being created, with > older ones becoming unusable and just consuming resources. > > Even if the issues with the settings is more the problem, the module > reloading could still make it worse of a problem depending on > SQLAlchemy works. Thus OP should probably also move the creation of > the engine out into a separate Python module somewhere on the > PythonPath and not in the document tree. This way mod_python will not > do reloading of it.
Hi, thanks for the answer. I moved the engine creation and the table reflection code in a separate package and now the number of opened connections stays at the same level. The module reloading of mod_python was what caused me trouble (although in most circumstances it's the right thing if you don't want to restart Apache every time you change some code). Karl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" 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/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
