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

Django Working with Databases #98

Open
stunstunstun opened this issue Feb 23, 2021 · 0 comments
Open

Django Working with Databases #98

stunstunstun opened this issue Feb 23, 2021 · 0 comments

Comments

@stunstunstun
Copy link
Owner

stunstunstun commented Feb 23, 2021

Overview

lib/pq is an excellent Postgres driver written in pure Go, but it only offers support for the default Postgres timeouts of connect_timeout and statement_timeout. These work well, but in a high availability situation, they might not be enough. statement_timeout only works if the connection to Postgres is alive and well. connect_timeout only provides a timeout during initial connection. Once the connection is in the pool, connect_timeout doesn't apply. If the database goes down, or the network dies, the open connections will hang. Without a read or write timeout on the connection, there is no way to recover quickly. pq-timeouts provides a way to add a timeout to every write and read to and from the database.

AWS Elastic Beanstalk as Production

https://docs.aws.amazon.com/ko_kr/elasticbeanstalk/latest/dg/create-deploy-python-container.html

References

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

No branches or pull requests

1 participant