Closed nirbenrey closed 4 years ago
In case the database goes down, or the network dies, the open connections will hang.
We set a timeout for reading and writing on the database connection. Since this functionality is not supported by lib/pq we use https://github.com/Kount/pq-timeouts library as suggested in https://github.com/lib/pq/issues/450
https://github.com/Kount/pq-timeouts
Coverage decreased (-0.09%) to 86.706% when pulling e016848184a518e583c9db31e58aae0384be6602 on nir--set-on-db-connection-read-and-write-timeouts into 2823f5c993dc10fe8188e47fc0691b26631a6739 on master.
Pull Request Template
Motivation
In case the database goes down, or the network dies, the open connections will hang.
Approach
We set a timeout for reading and writing on the database connection. Since this functionality is not supported by lib/pq we use https://github.com/Kount/pq-timeouts library as suggested in https://github.com/lib/pq/issues/450
Pull Request status
Third-party code
https://github.com/Kount/pq-timeouts