Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL server has gone away #96

Closed
bantonj opened this issue Oct 4, 2015 · 2 comments
Closed

MySQL server has gone away #96

bantonj opened this issue Oct 4, 2015 · 2 comments
Assignees

Comments

@bantonj
Copy link
Contributor

bantonj commented Oct 4, 2015

I have a site that is using the SqlAlchemyBackend and when the site is not accessed for 8 hours I get this error.

OperationalError: (_mysql_exceptions.OperationalError) (2006, 'MySQL server has gone away') [SQL: u'SELECT roles.role \nFROM roles \nWHERE roles.role = %s'] [parameters: ('user',)]

@bantonj
Copy link
Contributor Author

bantonj commented Oct 7, 2015

I tested out using SQLAlchemy's recommended fix for this issue, using the pool_recycle=3600 option. That seems to have fixed the issue.

http://docs.sqlalchemy.org/en/rel_0_8/dialects/mysql.html#mysql-connection-timeouts

@FedericoCeratto FedericoCeratto self-assigned this Nov 7, 2015
@FedericoCeratto
Copy link
Owner

Thanks for the PR, it's committed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants