On Apr 30, 7:03 pm, Christoph Haas <[EMAIL PROTECTED]> wrote:
> Fellow earthicans...
>
> I had to restart my PostgreSQL service here and noticed that Pylons doesn't
> recover properly. Instead of reconnecting to the database through
> SQLAlchemy I just get "internal error"s all along.
>
> Has anyone cared for a remedy to this problem? I know that SQLAlchemy
> doesn't notice a lost database link until a query is attempted. But can
> this perhaps be worked around? Or does anyone know about plans for
> auto-reconnect at SQLAlchemy?
>
> Cheers
> Christoph
>
> signature.asc
> 1KDownload
you means session time out? MySQL forced close db conenction, if idle
8 hours,
I use sqlalchemy.pool_recycle=-1 ,but when MySQL close connection,I
get some error.I find reason, I don't remove session,close
connection.
I try edit lib/base.py
def __call__(self, environ, start_response):
"""Invoke the Controller"""
# WSGIController.__call__ dispatches to the Controller method
# the request is routed to. This routing information is
# available in environ['pylons.routes_dict']
conn=config['pylons.g'].sa_engine.connect()
model.Session(bind=conn)
#print conn
try:
return WSGIController.__call__(self, environ, start_response)
finally:
model.Session.remove()
conn.close()
everything is ok.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---