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

Deal better with database connection loss (Issue #6) #7

Merged
merged 1 commit into from
May 18, 2018

Conversation

oz-linden
Copy link
Contributor

* Wrap all database operations (including reads) in an SQLAlchemy transaction
  per http://docs.sqlalchemy.org/en/latest/orm/session_basics.html#when-do-i-construct-a-session-when-do-i-commit-it-and-when-do-i-close-it
* Add configuration parameters to set the pool_recycle and pool_pre_ping engine parameters
  defaults are to recycle in 30 minutes and to always ping

I've been running with this in my errbot using an AWS RDS db storage backend for a little while now and have not seen the errors I was getting before when RDS disconnected.

    * Wrap all database operations (including reads) in an SQLAlchemy transaction
      per http://docs.sqlalchemy.org/en/latest/orm/session_basics.html#when-do-i-construct-a-session-when-do-i-commit-it-and-when-do-i-close-it
    * Add configuration parameters to set the pool_recycle and pool_pre_ping engine parameters
      defaults are to recycle in 30 minutes and to always ping
@gbin gbin merged commit 47350cb into errbotio:master May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants