Open brevilo opened 1 month ago
Also the Db_conn of the web code (in html/inc/db_conn.inc) is lacking a method to close a DB connection.
To be fair, in a web context it might be harder to decide if and when to close a connection as you might want to reuse it (opening connections is expensive). However, when you know it can be closed, it ought to be closed.
There should at least be the possibility given to do it. This is a generic general purpose class, not a specific page.
Various BOINC components don't properly close the DB connection they opened before. This is a problem because:
WARNING
, at least by MariaDB. MySQL still logs it asINFORMATION
but MariaDB has a good reason to warn about those: the root cause can in fact be caused by misconfiguration (e.g.max_allowed_packet
) or networking issues. Both should not get masked by otherwise harmless missing connection closing.Sampling only the current C API (e.g. used by daemons), you'll find:
boinc_db.open()
: [30](https://github.com/search?q=repo%3ABOINC%2Fboinc%20boinc_db.open\(&type=code)boinc_db.close()
: [9](https://github.com/search?q=repo%3ABOINC%2Fboinc%20boinc_db.close()&type=code)This indicates a general issue, not just in the C API.
Thanks