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

Add custom SQLAlchemy configurability and fix "MySQL has gone away". #118

Open
famecastle opened this issue Apr 10, 2020 · 0 comments
Open

Comments

@famecastle
Copy link
Contributor

The latter is just a very small change. When a program runs long enough (i.e. on a server), the connection is held open but MySQL closes them after a few hours. The trick is to create the engine with the pool_pre_ping parameter set to True (see https://stackoverflow.com/a/45078959 ). Please add this.

Also it would be nice to be able to pass not only the db_uri to all functions, but also something like sql_opts where you can specify those engine options as a dict.

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