views:

140

answers:

1

How do I limit my amf sessions to flex over pyamf?

I have set up a pyamf gateway to that serves value objects that originate from a django admin panel, through sqlalchemy to my authenticated flex client. It's working great, however there is a problem. My sessions are persisting and clogging up the server, so after about 20 or so AMF sessions are authenticated, it refuses any more until I restart the server.

+1  A: 

You are probably not removing the session after the request has been served.

Check out SQLAlchemy documentation on Session.remove.

njoyce
This puts me in the right direction for sure. The issue is how the sessions are created and how the connection pool is configured. Seems the way to go is to be sure clients are able to get a session from a single db engine and end it cleanly, and my script was a creating new profile for each incoming connection. I'm still delving into it. Good direction tho...
Pythovore