# Movie Scan hangs up

**URL:** <https://forums.plex.tv/t/movie-scan-hangs-up/772188>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [January 21, 2022, 9:47pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188 "2022-01-21T21:47:46Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 21, 2022, 9:47pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/1 "2022-01-21T21:47:46Z")

</div>

Server Version#: 1.25.4.5426  
Player Version#:NA

Scanning for new content. Seems to get about 20% done and just hangs

Running on Ubuntu 20.04

---

<div class="post-metadata">

**Author:** ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)\
**Post date:** [January 21, 2022, 9:50pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/2 "2022-01-21T21:50:48Z")

</div>

Does it seem to be getting stuck on a particular item? have you looks at [server logs?](https://support.plex.tv/articles/200250417-plex-media-server-log-files/)

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 21, 2022, 10:06pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/3 "2022-01-21T22:06:46Z")

</div>

Hanging on Cheech and Chong “Up in Smoke” LOL

I moved it out of the folder, and it is scanning now.  
What does this imply

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 21, 2022, 10:08pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/4 "2022-01-21T22:08:44Z")

</div>

Clearing bundles, emptying trash. OPtimzing DB

will put back in and scan

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 21, 2022, 10:25pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/5 "2022-01-21T22:25:15Z")

</div>

OK… NM…

After cleaning, I put is back in, and all is well. Plex was just stopping for a toke I guess.

thanks

---

<div class="post-metadata">

**Author:** ![blim5001](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@blim5001](https://forums.plex.tv/u/blim5001)\
**Post date:** [January 22, 2022, 2:28pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/6 "2022-01-22T14:28:48Z")

</div>

just adding my 2c, that the scanning in the latest beta does seem to be a little unreliable and often hangs.

I run a few servers in dockers and have seen it happen in more than one of them.

It will hang at different places, so it does not seem to be specific files that are causing it.

It also does not seem to be agent specific either, as I have seen it happen on different types of libraries.

I have downgraded them to an older version and scanning seems to work as expected.

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 22, 2022, 5:50pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/7 "2022-01-22T17:50:58Z")

</div>

I am finding you are correct.

@BigWheel  
I checked just now and it looks like nightly maintenance was hun on another movie. I canceled and it continued with scanning my music and photos. It was hung on a different movie this time.

There is definitely something up with this release. I will give it thru next week before I roll back

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 26, 2022, 8:02pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/8 "2022-01-26T20:02:06Z")

</div>

@BigWheel ,  
With PMS 1.25.3.5409 I have no scanning issues I am aware of.

with PMS **1.25.4.5468** and the next one back PMS hangs on scanning. I can duplicate every time with scanning my movie library, but it happens in other too.

Here are my logs  
[Plex Media Server Logs\_2022-01-26\_14-53-14.zip](https://forums.plex.tv/uploads/short-url/cL3HO25fJr5jOImb7ouPTHSAvsv.zip) (3.4 MB)

---

<div class="post-metadata">

**Author:** ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)\
**Post date:** [January 26, 2022, 8:38pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/9 "2022-01-26T20:38:36Z")

</div>

@blim5001 What OS are you running. Are you running on Ubuntu or some other flavor of linux as well?

---

<div class="post-metadata">

**Author:** ![blim5001](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@blim5001](https://forums.plex.tv/u/blim5001)\
**Post date:** [January 26, 2022, 9:47pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/11 "2022-01-26T21:47:03Z")

</div>

The ones I found it happening on were on my dockers, (using the Plex inc beta image.)

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 26, 2022, 11:02pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/12 "2022-01-26T23:02:53Z")

</div>

Ubuntu 20.04

native, not docker

---

<div class="post-metadata">

**Author:** ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)\
**Post date:** [January 28, 2022, 1:40am UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/14 "2022-01-28T01:40:24Z")

</div>

hey. @jwaltrip4 I didn’t realize you did not have debug logging enabled in server settings so the scan info is not in there. Could you enable debug logging (not verbose) then try to reproduce and get the logs again.

if we could get your logs as well @blim5001 it would be appreciated.

Also I should have asked, I was assuming your library is using he new Plex Movie agent. Is that correct?

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 28, 2022, 2:00am UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/15 "2022-01-28T02:00:01Z")

</div>

Will do

---

<div class="post-metadata">

**Author:** ![jishi](https://avatars.discourse-cdn.com/v4/letter/j/3ec8ea/32.png) [@jishi](https://forums.plex.tv/u/jishi)\
**Post date:** [January 28, 2022, 1:14pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/16 "2022-01-28T13:14:44Z")

</div>

I’m seeing the same thing on 1.25.4.xxxx versions. I haven’t yet upgraded libraries, not sure I wanna do that either to end up in a point of no return at the moment. Downgrading to 1.25.3 makes all library scans finish in a matter of seconds, but on 1.25.4 it tends to get stuck on certain particular entries (that has previously been indexed). However, according to the logs, the entry that it is reporting is logged as it would be skipped, so it might be the “next” file in the list that is the actual culprit, but there is no indication of which one that is.

According to the logs, it just seems to stall. The only thing standing out is this:

Jan 28, 2022 13:55:28.837 [0x7f449ada6b38] WARN - SLOW QUERY: It took 370.000000 ms to retrieve 50 items.  
Jan 28, 2022 13:55:28.876 [0x7f4499b8db38] WARN - SLOW QUERY: It took 300.000000 ms to retrieve 50 items.

I recall seeing some errors a few days ago when investigating this as well, about the database being locked, but not sure if related:

Jan 25, 2022 21:51:52.729 [0x7fbba7b34b38] ERROR - Soci Exception handled: Cannot begin transaction. database is locked  
Jan 25, 2022 21:51:54.775 [0x7fbba166cb38] ERROR - Failed to begin transaction (/data/jenkins/server/3533770972/Library/MediaStreamSetting.cpp:24) (tries=1): Cannot begin transaction. database is locked  
Jan 25, 2022 21:51:57.075 [0x7fbba166cb38] ERROR - Failed to begin transaction (/data/jenkins/server/3533770972/Library/MediaStreamSetting.cpp:24) (tries=2): Cannot begin transaction. database is locked  
Jan 25, 2022 21:51:59.374 [0x7fbba166cb38] ERROR - Failed to begin transaction (/data/jenkins/server/3533770972/Library/MediaStreamSetting.cpp:24) (tries=3): Cannot begin transaction. database is locked

Could there be some problematic db-migration, missing indexes or such that was introduced in 1.25.4? The changelog claims that major database migrations were applied, so doesn’t seem to farfetched.

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 28, 2022, 6:16pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/17 "2022-01-28T18:16:43Z")

</div>

Here are my logs

[Plex Media Server Logs\_2022-01-28\_13-14-15.zip](https://forums.plex.tv/uploads/short-url/wD6E85Paj18gTvzXiwcIJUAOj1s.zip) (947.0 KB)

---

<div class="post-metadata">

**Author:** ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)\
**Post date:** [January 28, 2022, 6:28pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/18 "2022-01-28T18:28:49Z")

</div>

> [@jwaltrip4](#):
>
> Plex Media [Server Logs\_2022-01-28\_13-14-15.zip](https://support.plex.tv/articles/200250417-plex-media-server-log-files/)

those still don’t seem to have [debug logging](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/#toc-1) enabled. make sure you are turning it on for the server not just the web app

 ![Plex](https://global.discourse-cdn.com/plex/original/4X/2/2/8/228f0080e3271b0477c91041ba656da09b95ec50.png)

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 28, 2022, 6:58pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/19 "2022-01-28T18:58:31Z")

</div>

Doh! I choe wrongdebug

Here it is… However with debug it is not happening.  
[Plex Media Server Logs\_2022-01-28\_13-57-14.zip](https://forums.plex.tv/uploads/short-url/hpWnVJ83bmSTQKoKYJZS31nQ5ia.zip) (2.4 MB)

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 28, 2022, 6:59pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/20 "2022-01-28T18:59:41Z")

</div>

Not happening now. Sigh

---

<div class="post-metadata">

**Author:** ![BigWheel](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/bigwheel/32/78783_2.png) [@BigWheel](https://forums.plex.tv/u/BigWheel)\
**Post date:** [January 28, 2022, 11:09pm UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/21 "2022-01-28T23:09:41Z")

</div>

OK will need to see logs from after it happens. Unfortunately the debug level is not retroactive to previous events.

---

<div class="post-metadata">

**Author:** ![jwaltrip4](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/jwaltrip4/32/11399_2.png) [@jwaltrip4](https://forums.plex.tv/u/jwaltrip4)\
**Post date:** [January 29, 2022, 4:40am UTC](https://forums.plex.tv/t/movie-scan-hangs-up/772188/22 "2022-01-29T04:40:53Z")

</div>

I will watch and hit you up if it happens again

Is there any impact just leaving debug on?

[Next page](https://forums.plex.tv/t/movie-scan-hangs-up/772188.md?page=2)
