python - SQLAlchemy + MySQL connections blocking for several hours -


i'm using sqlalchemy 0.9.1 + mysql 5.6.19a (via amazon rds), , it's been working under heavy load (dozens of processes reading & writing simultaneously) several months. morning see several processes blocked several hours when trying read and/or write database.

i'm using session_scope suggested in sqlalchemy docs:

@contextmanager def session_scope():     """provide transactional scope around series of sqlalchemy operations."""      session = session()     try:         yield session         session.commit()     except:         session.rollback()         raise     finally:         session.close() 

so example:

with session_scope() session:     # create new record, set timestamp     record = metricssnapshot()     record.timestamp = timestamp     session.add(record) 

and see code never raised exception. seems have blocked 4 hours, , continued. don't think has happened in past, i'm not sure have caused it.

is conceivable timeouts in sqlalchemy or mysql set high enough allow 4 hour delay? there else might able check figure out happened?


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -