I'm staring at the code for both pyramid_beaker and the SessionMiddleware,
and in both cases I do not see any code to close the session. The behavior
looks to be consistent between the two to me. Neither library appears to do
anything unless the session object was accessed, and in both cases they
simply call session.persist() on a SessionObject.

https://github.com/bbangert/beaker/blob/master/beaker/middleware.py#L136
https://github.com/Pylons/pyramid_beaker/blob/master/pyramid_beaker/__init__.py#L26


On Wed, Feb 6, 2013 at 3:33 PM, Wyatt Baldwin
<[email protected]>wrote:

> I'm in the process of migrating a Pylons app to Pyramid. It uses a
> SQLAlchemy/MySQL back end for sessions (the session DB is separate from the
> main app DB).
>
> I swapped out Beaker's SessionMiddleware with a pyramid_beaker session
> factory. This seems like a straightforward transformation, and under the
> hood pyramid_beaker looks quite similar to SessionMiddleware (i.e., the way
> the session object is initialized per request is very similar).
>
> The problem I'm having is this: session DB connections aren't being
> closed, which causes the app to hang. If I switch to a file based back end,
> everything works fine.
>
> Most likely, I'm overlooking something that should be obvious, but has
> anyone run into similar issues when moving from SessionMiddleware to
> pyramid_beaker?
>
> --
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to