BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
1.98k stars 443 forks source link

Missing DB connection closing #5691

Open brevilo opened 1 month ago

brevilo commented 1 month ago

Various BOINC components don't properly close the DB connection they opened before. This is a problem because:

Sampling only the current C API (e.g. used by daemons), you'll find:

This indicates a general issue, not just in the C API.

Thanks

bema-aei commented 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.

brevilo commented 1 month ago

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.

bema-aei commented 1 month ago

There should at least be the possibility given to do it. This is a generic general purpose class, not a specific page.