You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The functions 'query' and 'save_to_database' in api.py open a new database connection every time they are called, but they don't close the connection before returning. Unfortunately, when Python deletes the no-longer-in-scope connection object, it too fails to close the database connection properly, but instead simply closes the underlying socket. This doesn't affect the web application, but every time it happens, the back-end database server writes an 'Aborted connection' error message to its log file. When the web application is being invoked many thousands of times a day, the database server log becomes filled with these messages, which can hide real error messages which the DBAs might need to see.
Please add a call to the database connection object's 'close' or 'disconnect' method in both 'query' and 'save_to_database'.
The text was updated successfully, but these errors were encountered:
The functions 'query' and 'save_to_database' in api.py open a new database connection every time they are called, but they don't close the connection before returning. Unfortunately, when Python deletes the no-longer-in-scope connection object, it too fails to close the database connection properly, but instead simply closes the underlying socket. This doesn't affect the web application, but every time it happens, the back-end database server writes an 'Aborted connection' error message to its log file. When the web application is being invoked many thousands of times a day, the database server log becomes filled with these messages, which can hide real error messages which the DBAs might need to see.
Please add a call to the database connection object's 'close' or 'disconnect' method in both 'query' and 'save_to_database'.
The text was updated successfully, but these errors were encountered: