Hi,
I know that this was discussed several times in the past but I can't solve
the problem with the tip that I read in this list. Every morning my
application dies with the msg "MySQL has gone away". My app has different
modules (which are process) and this errors appears in the simplest one and
in the complex one too. There is no activity usually at night, specially in
one of the modules that has the issue more frequently.
This lines setup the session:
engine = create_engine(mysql_uri, pool_recycle=config.db_pool_recycle) #
Configure in 300 seconds right now.
DBSession = scoped_session(sessionmaker(autocommit=False,
autoflush=False,
bind=engine))
THe simplest module only do this with the DB:
try:
delivery = db.DBSession.query(db.Delivery).\
filter(db.Delivery.id == delivery_cmsg.delivery_id).one()
except NoResultFound:
print 'WARN: invalid delivery ID: ' + int(delivery_cmsg.delivery_id)
return
finally:
db.DBSession.commit()
print delivery.name, delivery.start, delivery.status
And it has the issue every morning.
I'm using SA 0.7.9 and MySQLdb 1.2.4c1.
Is there a checklist of things to check that could cause this problem?
Regards,
Diego
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sqlalchemy/-/eCZCfjMB29gJ.
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.