Hi,
I'm running SA 0.4 on 3 instances of cherrypy, each with 10 threads.
Each thread creates its own Session object when it initializes, and
reuses the Session continually. This is what my SA init code looks
like:
db = sa.create_engine("mysql://%s:[EMAIL PROTECTED]/%s" % (DBUSER, DBPASSWORD,
DBHOST, DBINSTANCE), pool_size=40, pool_recycle=3600, max_overflow=2)
Session = orm.sessionmaker(bind=db, autoflush=True,
transactional=True)
After leaving the dev server alone overnight, it comes up with the
error:
OperationalError: (OperationalError) (2006, 'MySQL server has gone
away')
Am I using pool_recycle incorrectly, or is there something else I
should be doing to ensure Session pulls a good connection from the
pool?
Thanks for any help or suggestions. SA is mindblowingly amazing.
Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---