Jian wrote:
Hi Jason,
thanks for the reply.
My pylons basecontroller takes care of the session clean up
like this:
class BaseController(WSGIController):
def __call__(self, environ, start_response):
try:
return WSGIController.__call__(self, environ,
start_response)
finally:
model.Session.remove()
When I use model.Session.close(), everything works.
But error comes whenever i change it to model.Session.remove().
AFAIK, remove() make more sense than close() on a real site with
dynamic load
which is learned from SA docs.
I believe that remove() simply detaches the session from the
current context, it doesn't explicitly close it out or release the
bound connection for a transactional session. Try closing before
you remove.