PMS Crash due to sync tasks?

Server Version: 1.13.5.5332
DSM Version: DSM 6.2-23739 Update 2
NAS Model: DS3617xs
Plex Media Server Logs_2018-09-19_23-51-35.zip (3.7 MB)

I really have no idea why PMS started crashing a few days ago, so I turned on debug logging and a crash occurred later.

Hope I can get some help with this one.

Update 1: It seems to be sync related, I disabled sync for all my users and it no longer crashes. Any idea what might be wrong ?

Thanks for looking into it.

Is there any other way to solve the issue and leave sync on ?

About repairing the database, I tried it already, it seemed to “work” for a few days and then the crashes came back.

Would it help if all the users clear their synced items from their devices ?

There appears to have been a database lockout affecting processing of downloaded syncs and eventually clogging up the server.

The problem appears to have started at 23:22:54:

Sep 19, 2018 23:22:53.156 [0x7f2148da1700] DEBUG - Sync: garbage collected database for sync list 24871232 in 0.0 seconds
Sep 19, 2018 23:22:53.156 [0x7f2148da1700] DEBUG - Sync: garbage collecting database for sync list 28014989
Sep 19, 2018 23:22:53.157 [0x7f2148da1700] DEBUG - Sync: garbage collected database for sync list 28014989 in 0.0 seconds
Sep 19, 2018 23:22:54.069 [0x7f2148da1700] ERROR - Failed to begin transaction (../Sync/SyncItemProcessor.cpp:697) (tries=1): Cannot begin transaction. database is locked
Sep 19, 2018 23:22:54.389 [0x7f2148da1700] ERROR - Failed to begin transaction (../Sync/SyncItemProcessor.cpp:697) (tries=2): Cannot begin transaction. database is locked
Sep 19, 2018 23:22:55.028 [0x7f2148da1700] ERROR - Failed to begin transaction (../Sync/SyncItemProcessor.cpp:697) (tries=3): Cannot begin transaction. database is locked
Sep 19, 2018 23:22:55.306 [0x7f2148da1700] ERROR - Failed to begin transaction (../Sync/SyncItemProcessor.cpp:697) (tries=4): Cannot begin transaction. database is locked

and after this sync updates were just hung - with all these requests got stuck and never completed

Sep 19, 2018 23:24:01.259 [0x7f2149f35700] DEBUG - Request: [190.181.12.147:65448 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (29 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:24:01.268 [0x7f2148ab3700] DEBUG - Request: [190.181.12.147:65459 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/64666/downloaded (28 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:24:01.285 [0x7f21487c5700] DEBUG - Request: [190.181.12.147:65475 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (27 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:24:01.292 [0x7f214a223700] DEBUG - Request: [190.181.12.147:65477 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (26 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:27:20.252 [0x7f2149959700] DEBUG - Request: [190.181.12.147:65514 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (28 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:27:21.796 [0x7f2149c47700] DEBUG - Request: [190.181.12.147:65518 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (29 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:27:21.810 [0x7f214966b700] DEBUG - Request: [190.181.12.147:49155 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (28 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:27:22.574 [0x7f214937d700] DEBUG - Request: [190.181.12.147:49154 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (28 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:02.465 [0x7f214de23700] DEBUG - Request: [190.181.12.147:49160 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (39 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:02.476 [0x7f213a911700] DEBUG - Request: [190.181.12.147:49162 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (39 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:02.486 [0x7f2139a6b700] DEBUG - Request: [190.181.12.147:49159 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (38 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:02.494 [0x7f213a623700] DEBUG - Request: [190.181.12.147:49161 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (38 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:40.565 [0x7f213a335700] DEBUG - Request: [190.181.12.147:49172 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (39 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:40.584 [0x7f213abff700] DEBUG - Request: [190.181.12.147:49174 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (39 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:40.590 [0x7f214bbff700] DEBUG - Request: [190.181.12.147:49180 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (38 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:28:41.122 [0x7f213948f700] DEBUG - Request: [190.181.12.147:49188 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (37 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:29:23.893 [0x7f21382fb700] DEBUG - Request: [190.181.12.147:49192 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (44 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:29:23.907 [0x7f2137d1f700] DEBUG - Request: [190.181.12.147:49194 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (43 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:29:23.917 [0x7f21391a1700] DEBUG - Request: [190.181.12.147:49202 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (42 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:29:23.921 [0x7f21385e9700] DEBUG - Request: [190.181.12.147:49203 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (41 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:02.357 [0x7f214c511700] DEBUG - Request: [190.181.12.147:49215 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (43 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:02.374 [0x7f2137743700] DEBUG - Request: [190.181.12.147:49222 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (42 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:03.115 [0x7f2137a31700] DEBUG - Request: [190.181.12.147:49239 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (44 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:13.896 [0x7f2136e79700] DEBUG - Request: [190.181.12.147:49212 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (45 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:43.054 [0x7f21365af700] DEBUG - Request: [190.181.12.147:49248 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (53 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:43.073 [0x7f2138eb3700] DEBUG - Request: [190.181.12.147:49245 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (52 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:43.084 [0x7f2136b8b700] DEBUG - Request: [190.181.12.147:49247 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (51 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:30:43.085 [0x7f2137167700] DEBUG - Request: [190.181.12.147:49246 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30765/downloaded (50 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:31:49.536 [0x7f2135fd3700] DEBUG - Request: [190.181.12.147:49270 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (60 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:31:49.549 [0x7f213541b700] DEBUG - Request: [190.181.12.147:49267 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (59 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:31:49.559 [0x7f2135709700] DEBUG - Request: [190.181.12.147:49279 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (59 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:31:50.604 [0x7f2137455700] DEBUG - Request: [190.181.12.147:49293 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (59 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:33:11.875 [0x7f2133cab700] DEBUG - Request: [190.181.12.147:49327 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (74 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:33:11.895 [0x7f21333e1700] DEBUG - Request: [190.181.12.147:49332 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (73 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:33:11.909 [0x7f213977d700] DEBUG - Request: [190.181.12.147:49331 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (72 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:33:12.350 [0x7f2134287700] DEBUG - Request: [190.181.12.147:49319 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30765/downloaded (74 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:34:20.766 [0x7f2133f99700] DEBUG - Request: [190.181.12.147:49348 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (70 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:34:20.799 [0x7f213512d700] DEBUG - Request: [190.181.12.147:49354 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (69 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:34:21.380 [0x7f2135ce5700] DEBUG - Request: [190.181.12.147:49359 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (69 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:34:21.694 [0x7f213689d700] DEBUG - Request: [190.181.12.147:49339 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30765/downloaded (68 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:05.792 [0x7f21330f3700] DEBUG - Request: [190.181.12.147:49381 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (70 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:05.801 [0x7f21336cf700] DEBUG - Request: [190.181.12.147:49383 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (69 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:06.322 [0x7f2134863700] DEBUG - Request: [190.181.12.147:49393 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (69 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:06.965 [0x7f2134b51700] DEBUG - Request: [190.181.12.147:49380 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (69 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:50.060 [0x7f2132e05700] DEBUG - Request: [190.181.12.147:49420 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/30759/downloaded (74 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:50.081 [0x7f21362c1700] DEBUG - Request: [190.181.12.147:49418 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (73 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:50.095 [0x7f21359f7700] DEBUG - Request: [190.181.12.147:49427 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/296264/downloaded (72 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:35:50.672 [0x7f2134575700] DEBUG - Request: [190.181.12.147:49434 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (72 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:36:32.050 [0x7f21339bd700] DEBUG - Request: [190.181.12.147:49462 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/206195/downloaded (76 live) TLS GZIP Signed-in Token (poutache88)
Sep 19, 2018 23:36:32.066 [0x7f2134e3f700] DEBUG - Request: [190.181.12.147:49467 (WAN)] PUT /sync/E2A57C8C-B07B-48A2-9C31-2247534FE4D1/item/295652/downloaded (75 live) TLS GZIP Signed-in Token (poutache88)

Will have to treat this like a a deadlock problem and for deadlocks we do need process dump and connections list as well the logs

But first I would recommend upgrading to the 1.13.8.5388 beta since the logs also highlighted an issue fixed in that version

Sep 19, 2018 23:14:42.364 [0x7f214de23700] WARN - Sync: Couldn't get sync lists without subscription.

The advice for diagnostics for deadlocks for Linux / NAS systems is as follows

PMS Deadlock diagnostics on NAS/Linux

It would need shell access to the Linux environment on the NAS.

On the next lockout, in a browser get this request to this server (assuming it is on IP 192.168.0.13)

http://192.168.0.13:32400/connections?X-Plex-Token=zzzzzzzzzzzzzzzzz

Substitute the server token for the zzzzzzzzzzzzzzzzzzz
See this article for how to find the token
https://support.plex.tv/articles/204059436-finding-an-authentication-token-x-plex-token/

Copy the response of the /connections request to a text file and send it to me by private message referencing this forum topic

Then get a process dump through the command line in Linux in a ssh session
kill -SEGV <pid>
where <pid> is the PID number for the Plexmediaserver process

The crash report would get uploaded when you restart the server

Wait for few minutes after restart and then get the logs zip and attach here. that will identify the upload information for the process dump
See https://support.plex.tv/articles/200250417-plex-media-server-log-files/

Quick update, updating to latest beta didn’t resolve the issue.

Do you know if there is a way to find the user causing the sync issues ?

The clogged requests were sync related from user poutache88 - but they could be a symptom rather than the cause. The server deadlocked at 23:22;54 and the cause of the deadlock may be not related to sync and the sync update requests then just queued up

With the release of a fix for deadlocks in 1.14.0.5468 beta - i am closing this topic, For any new deadlocks, a new forum topic should be raised.

Plex Media Server 1.14.0.5468 has just been released as Beta. It has a fix for the deadlock seen in diagnostics provided in this forum thread.

See Release Notice

  • (Transcoder) Resolved a rare deadlock (#9332)