demitri schrieb:
> Hi,
> 
> I'm having a problem with my 2.0.3 installation. Let's say I click on
> a link that results in a long request to my database. While waiting, I
> click on the same link (or another link) that similarly generates a
> request to the database, the whole app then hangs.
> 
> All of my database access is defined in a custom module that I use
> with other (non TG) scripts, so I've disabled all of the built-in
> database connectivity (or at least don't import it).
> 
> This is how I generate the Session class:
> 
> Session = scoped_session(sessionmaker(bind=engine, autocommit=True,
> autoflush=False))
> 
> I create an instance of Session in the file controllers/__init__.py:
> 
> session = Session()

This is wrong. You don't instantiate the session on that level. You 
simply use the generated class. One can instantiate it per request - but 
that's not even needed, the class proxies calls to it to a per-thread 
instance.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to