Ran into an issue where the Orion UI would display these two warnings, and DB maintenance would just hang (run for days, never finish):
- Database maintenance is overdue.
- SAM maintenance is overdue.

Both warnings were hyperlinks; "Database maintenance is overdue." would take me to an empty page like this:

... whereas "SAM maintenance is overdue." would display several lines with errors like "this and that table is NN days overdue" (did not take a screenshot, regretfully).
We run NPM, SAM: 2023.3.0. Don't remember this happening before.
Notes:
- Attempting to start Database Maintenance on the Orion server showed an error, "already running"
- Checking the Task Manager on the server showed the database maintenance process indeed running
- Checking
swdebugMaintenanceExecutionHistory.log
(thanks Petr): no entries for a few days.
2023-12-27 02:17:28,717 Database Maintenance Complete, time elapsed: 144.433 sec.
2023-12-28 02:17:12,844 Database Maintenance Complete, time elapsed: 129.386 sec.
2023-12-29 02:17:08,787 Database Maintenance Complete, time elapsed: 124.658 sec.
2023-12-30 02:17:22,459 Database Maintenance Complete, time elapsed: 138.407 sec.
- Checking
swdebugMaintenance.log
: no errors, a few warnings, and the last few lines seem to indicate that DB maintenance got stuck on "Beginning Maintenance for Orion.LogMgmt" on New Year's eve:
2023-12-31 02:15:01,760 [1] WARN SolarWinds.Data.DatabaseMaintenance.MaintenanceEngine - No TableHandlers descriptions found!
2023-12-31 02:15:02,151 [1] WARN SolarWinds.Data.DatabaseMaintenance.MaintenanceEngine - No TableHandlers descriptions found!
2023-12-31 02:15:02,433 [1] WARN SolarWinds.Data.DatabaseMaintenance.MaintenanceEngine - No TableHandlers descriptions found!
2023-12-31 02:16:11,014 [1] INFO SolarWinds.Data.DatabaseMaintenance.MaintenanceEngine - Beginning Maintenance for Orion.LogMgmt
*** Assembly SolarWinds.Orion.LogMgmt.Maintenance, Version=2023.3.0.0, Culture=neutral, PublicKeyToken=null, .NET version v4.0.30319 ***
2023-12-31 02:16:11,014 [15] INFO SolarWinds.Orion.LogMgmt.Maintenance.LogMaintenancePlugin - Before Orion.LogMgmt
2023-12-31 02:16:11,014 [15] INFO SolarWinds.Orion.LogMgmt.Maintenance.LogMaintenancePlugin - Executing OrionLog_EnsurePartitionsEx with @MaxDaysIntoFuture = 30
2023-12-31 02:16:11,029 [15] INFO SolarWinds.Orion.LogMgmt.Common.Storage.LogConnectionStringStorage - Reading connection string from C:\ProgramData\SolarWinds\OLM\LogStorage\LogConfig.config
2023-12-31 02:16:11,337 [15] INFO SolarWinds.Orion.LogMgmt.Maintenance.LogMaintenancePlugin - Finished OrionLog_EnsurePartitionsEx
2023-12-31 02:16:11,337 [15] INFO SolarWinds.Orion.LogMgmt.Maintenance.LogMaintenancePlugin - Executing OrionLog_EnforceRetentionPeriods
Stopping the DB maintenance task via Task Manager and starting it manually - same story, it run for a minute or so, get to "Beginning Maintenance for Orion.LogMgmt", and then just get stuck there with no obvious signs of anything wrong.
