Server Version#: 1.32.1.6999
Player Version#: All / not relevant
Server OS: Ubuntu 22.04.2 LTS
Server-CPU: Intel(R) Core™ i7-8700 CPU @ 3.20GHz
Memory: 64GB
Hi,
since two weeks (the issue ocurred for the first time on May 2), my plex server regurlary stops responding to any sort of request. When trying to access Plex web, the website loads indefinitely. This happens at least once per day and can only be resolved by restarting the docker container.
Looking into the logs, the issue seems to be related to a locked database. Here is an excerpt of the log:
May 16, 2023 16:49:02.961 [140330846280504] ERROR - [Req#2fba12] Waited over 10 seconds for a busy database; giving up.
May 16, 2023 16:49:03.128 [140330943400760] ERROR - [Req#2fb9f1] Waited over 10 seconds for a busy database; giving up.
May 16, 2023 16:49:03.492 [140330848389944] ERROR - [Req#2fb9f8] Waited over 10 seconds for a busy database; giving up.
May 16, 2023 16:49:03.751 [140330821765944] ERROR - [Req#2fba08] Waited over 10 seconds for a busy database; giving up.
May 16, 2023 16:49:03.939 [140330812316472] DEBUG - [Req#2fba17] 36 threads are waiting on db connections held by threads: 140331570617144,140330848389944,140331339270968,140331180575544,140330943400760,140330846280504,140330828880696,140331249810232,140330831252280,140331404532536,140331132595000,140330833361720,140330818644792,140331021331256,140330941291320,140330861046584,140330945510200,140331240684344,140331134704440,140330821765944
May 16, 2023 16:49:03.939 [140331313314616] DEBUG - 36 threads are waiting on db connections held by threads: 140331570617144,140330848389944,140331339270968,140331180575544,140330943400760,140330846280504,140330828880696,140331249810232,140330831252280,140331404532536,140331132595000,140330833361720,140330818644792,140331021331256,140330941291320,140330861046584,140330945510200,140331240684344,140331134704440,140330821765944
The log is full of these messages. I can provide the complete debug log on request, but I would like to avoid posting it publicly, because it contains sensitive information (usernames).
I already tried to optimize the DB, cleaned up the packages and I even tried to repair the database with PlexDBRepair (GitHub - ChuckPa/PlexDBRepair: Database repair utility for Plex Media Server databases), running ./DBRepair.sh stop check repair reindex start exit. The utility worked fine, but Plex keeps hanging up.
I am now out of ideas and any help would be greatly appreciated.