Plex crashing in Synology nas

I noticed two crashes in the logs. Both times when intro detection was running during nightly maintenance. Plex finished intro detection for The Grand Tour - Survival of the Fattest (if I’m reading the logs correctly), logs a “took too long to start transaction” message, then stops. See below.

There are also quite a few “slow query” entries in the log files.

In Settings → Library, what is the setting for Generate intro video markers?

In Settings → Scheduled Tasks, do you have Optimize database every week selected?

Suggestions:

First, perform steps 2, 3, & 4 of the Plex Dance. When that has finished, optimize the database. You’re not “dancing” any files, just performing those steps of the process. This should help with the slow query entries in the log files.

Second, disable Intro Detection in Settings → Library. Then wait to see if the server makes it through nightly maintenance without crashing.

I cannot tell why Plex is crashing during Intro Detection. Disabling it is a temporary step to try and isolate the problem.

Write back whether or not Plex makes it through the night. If it crashes, pull the log files and attach to the thread.


Multiple slow query entries:
Feb 15, 2022 02:59:53.162 [0x7f246d314b38] WARN - SLOW QUERY: It took 380.000000 ms to retrieve 1 items.

Last entries in Plex Media Server.1.log. Also at end of Plex Media Server.3.log.

Feb 15, 2022 04:35:46.881 [0x7f246d52db38] DEBUG - IntroDetector: Initializing for "" (12159)
Feb 15, 2022 04:35:46.893 [0x7f246d52db38] DEBUG - Activity: updated activity b9a77301-745e-409c-af54-8bbdc660e002 - completed 100.0% - Butler tasks
Feb 15, 2022 04:35:46.893 [0x7f246d52db38] DEBUG - Activity: updated activity b9a77301-745e-409c-af54-8bbdc660e002 - completed 100.0% - Butler tasks
...
Feb 15, 2022 04:36:02.001 [0x7f246c7cfb38] WARN - Held transaction for too long (/data/jenkins/server/3535999200/Statistics/StatisticsManager.cpp:249): 0.950000 seconds
Feb 15, 2022 04:36:09.039 [0x7f246d65eb38] WARN - Took too long (0.220000 seconds) to start a transaction on /data/jenkins/server/3535999200/Statistics/StatisticsResources.cpp:18
Feb 15, 2022 04:36:09.040 [0x7f246d65eb38] WARN - Transaction that was running was started on thread 0x7f246d693b38 at /data/jenkins/server/3535999200/Statistics/StatisticsResources.cpp:18
Feb 15, 2022 04:36:22.143 [0x7f246c7cfb38] WARN - Took too long (0.490000 seconds) to start a transaction on /data/jenkins/server/3535999200/Statistics/StatisticsResources.cpp:18
Feb 15, 2022 04:36:22.231 [0x7f246c7cfb38] WARN - Transaction that was running was started on thread 0x7f246c7cfb38 at /data/jenkins/server/3535999200/Statistics/StatisticsResources.cpp:18