Open
Description
See #838 for background (and more specifically this comment).
The approach with a single SQL statement based session clean-up job has been historically been somewhat problematic, seeing several revisions to address issues seen with specific RDMBSs. The currently used statement is susceptible to deadlocks in MySQL/MariaDB and SQL Server.
We should consider improving the session clean-up job so that it:
- is more robust, i.e. isn't susceptible to deadlocks
- provides more insight into expired sessions (debug logs etc.)
- doesn't execute on multiple nodes simultaneously in a cluster out-of-the-box
- is easier to customize