Scanning photo library crashes PMS

Server Version#: Version 1.23.0.4482
Player Version#: NA

I recently moved my plex server from a Synology DS1812+ to DS1621xs+
I followed the Plex guide for moving the library and everything went smoothly… EXCEPT…

Plex crashes whenever I trigger a library scan of my photos (or it’s triggered automatically)
The Plex package shows as stopped and I have to restart it.

I had a look through the logs and can’t find anything useful.

How do I tell what file is making it crash?

I have 75,000 photos it would take forever to narrow it down… I’m hoping there is some way to log what file it’s processing? I tried turning on debug and verbose logging but still can’t find any errors.

I didn’t find the exact file but I noticed it was crashing on a set of folders that were .tif scans of slides. None of them were corrupt and they indexed fine on my old NAS but I converted them all to .jpg and the crashes stopped… actually I spoke too soon. It stopped crashing but some of the thumbnails are missing and the slide folder looks like this… going to try re-adding the library from scratch.

image

Ok… progress?? I had to reconvert EVERY tif file I had even though an older version of plex had indexed the same files ok. I installed imagemagick to do the numbered files like this:

find . -iname *[0-9].tif | while read f; do echo "Converting ${f}"; convert "${f}" "${f%.*}-b.tif"; done
then I’d remove the files after verifying they were ok with:
rm **/*[0-9].tif
then rename the new files with this:
for f in **/*[-b].tif; do echo "Renaming ${f}"; mv "${f}" "${f//-b/}"; done

After much crashing I was able to get the library to scan OK. However, now all my timeline dates were screwed up. So I used exif to set the dates based on the folder name with something like this:

exiftool -AllDates="1976:10:10 00:00:00" 1976*

Now, Plex is crashing AGAIN. Logs look like this (path is long I edited it to ‘myfolder’)

May 12, 2021 16:57:39.100 [0x7f126fe5cb38] DEBUG - Performing a scan with 'Plex Photo Scanner' (language: en virtual: 0).
May 12, 2021 16:57:39.100 [0x7f126fe5cb38] DEBUG -   * Scanning /volume1/photo/myfolder
May 12, 2021 16:57:39.101 [0x7f126fe5cb38] DEBUG - Scanner: Processing directory /volume1/photo/myfolder (parent: yes)
May 12, 2021 16:57:39.103 [0x7f126fe5cb38] DEBUG - File '/volume1/photo/myfolder/Scan-130716-0001.tif' changed size, can't skip.
May 12, 2021 16:57:39.104 [0x7f126fe5cb38] DEBUG - Looking for path match for [/volume1/photo/myfolder/Scan-130716-0001.tif]
May 12, 2021 16:57:39.105 [0x7f126fe5cb38] DEBUG - Path matched, we're reusing media item 1034558
May 12, 2021 16:57:39.286 [0x7f126fe5cb38] DEBUG - [JobRunner] Job running: '/volume1/@appstore/Plex Media Server/CrashUploader' '--directory=/volume1/Plex/Library/Application Support/Plex Media Server/Crash Reports/1.23.0.4482-62106842a' '--version=1.23.0.4482-62106842a' '--platform=Linux' '--platformVersion=DSM 6.2.4.25556-0' '--serverUuid=8a966c595bee65d32408968cc979388c0d205d91' '--userId=me@here.com' '--sentryUrl=https://sentry.io/api/1233455/minidump' '--sentryKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' '--vendor=Synology' '--model=x86_64' '--device=DS1621xs+' '--allowRetries=0'

Thanks @trumpy81 that’s pretty helpful. I didn’t shut down plex when I was adding the exif so maybe that was the problem.

I don’t have very deep folder structures I just named them descriptively like:

Photo
     Dads-Slides
         1955 - 1956 - Walt in Japan Part 9
                       Scan-130914-0001.tif

I don’t have meaningful dates or descriptions for these thousands of slide scans.
I’ll try fixing up the exif then firing up plex and if the scan fails I’ll recreate the library from scratch again.

It crashed again :confused: going to delete the library and start again from scratch maybe it’ll all be fine tomorrow.

Getting a different error now. I think I might give up on this for awhile unless someone from Plex can tell me whats going on there’s only so many hours it makes sense to spend on this and the errors don’t make any sense to me.

ay 12, 2021 20:10:20.523 [0x7faec792bb38] DEBUG - Migrating metadata settings from local://768127 -> com.plexapp.agents.none://768127?lang=en
May 12, 2021 20:10:20.524 [0x7faec82a0b38] WARN - AutoTagging: the service is currently throttled, skipping item 768127
May 12, 2021 20:10:20.524 [0x7faec82a0b38] DEBUG - AutoTagging: completed 1 items
May 12, 2021 20:10:20.801 [0x7faec9f18b38] DEBUG - Auth: authenticated user 1 as Tailslide
May 12, 2021 20:10:20.802 [0x7faec8eb7b38] DEBUG - Request: [192.168.12.57:57009 (Subnet)] GET /statistics/bandwidth?timespan=6 (9 live) TLS GZIP Signed-in Token (Tailslide)
May 12, 2021 20:10:20.802 [0x7faec827db38] DEBUG - Request: [127.0.0.1:50452 (Loopback)] GET /library/changestamp (9 live) GZIP Signed-in Token (Tailslide)
May 12, 2021 20:10:20.802 [0x7faec9ef5b38] DEBUG - Completed: [127.0.0.1:50452] 200 GET /library/changestamp (9 live) GZIP 0ms 499 bytes (pipelined: 268)
May 12, 2021 20:10:20.804 [0x7faec7fbeb38] DEBUG - Request: [127.0.0.1:50452 (Loopback)] GET /:/metadata/notify/changeItemState?librarySectionID=10&metadataItemID=755655&metadataType=13&state=-1&parentID=-1&rootID=-1&mediaState=idle (9 live) GZIP Signed-in Token (Tailslide)
May 12, 2021 20:10:20.805 [0x7faec9f18b38] DEBUG - Completed: [127.0.0.1:50452] 200 GET /:/metadata/notify/changeItemState?librarySectionID=10&metadataItemID=755655&metadataType=13&state=-1&parentID=-1&rootID=-1&mediaState=idle (9 live) GZIP 0ms 195 bytes (pipelined: 269)
May 12, 2021 20:10:20.805 [0x7faec8333b38] DEBUG - Request: [127.0.0.1:50452 (Loopback)] PUT /services/imagga/process/755655 (9 live) GZIP Signed-in Token (Tailslide)
May 12, 2021 20:10:20.805 [0x7faec82a0b38] WARN - AutoTagging: the service is currently throttled, skipping item 755655
May 12, 2021 20:10:20.805 [0x7faec82a0b38] DEBUG - AutoTagging: completed 1 items
May 12, 2021 20:10:20.806 [0x7faec9f18b38] DEBUG - Completed: [127.0.0.1:50452] 200 PUT /services/imagga/process/755655 (9 live) GZIP 0ms 195 bytes (pipelined: 270)
May 12, 2021 20:10:20.808 [0x7faec8a75b38] DEBUG - Request: [127.0.0.1:50452 (Loopback)] GET /library/changestamp (9 live) GZIP Signed-in Token (Tailslide)
May 12, 2021 20:10:20.808 [0x7faec9f18b38] DEBUG - Completed: [127.0.0.1:50452] 200 GET /library/changestamp (9 live) GZIP 0ms 499 bytes (pipelined: 271)
May 12, 2021 20:10:20.811 [0x7faec9f18b38] DEBUG - Completed: [192.168.12.57:57009] 200 GET /statistics/bandwidth?timespan=6 (9 live) TLS GZIP 9ms 3089 bytes (pipelined: 31)
May 12, 2021 20:10:20.817 [0x7faec9324b38] DEBUG - [JobRunner] Job running: '/volume1/@appstore/Plex Media Server/CrashUploader' '--directory=/volume1/Plex/Library/Application Support/Plex Media Server/Crash Reports/1.23.0.4482-62106842a' '--version=1.23.0.4482-62106842a' '--platform=Linux' '--platformVersion=DSM 6.2.4.25556-0' '--serverUuid=8a966c595bee65d32408968cc979388c0d205d91' '--userId=me@here.com' '--

also

May 12, 2021 20:10:20.808 [0x7fca994ad728] DEBUG - Updating metadata item (save) (IMG_0053) with ID 755655
May 12, 2021 20:10:20.811 [0x7fca994ad728] DEBUG - Analyzing media parts for item 755656 (IMG_0054): 1089756
May 12, 2021 20:10:20.871 [0x7fca994ad728] DEBUG - Downloading document http://127.0.0.1:32400/library/changestamp
May 12, 2021 20:10:20.871 [0x7fca994ad728] DEBUG - HTTP requesting GET http://127.0.0.1:32400/library/changestamp
May 12, 2021 20:10:21.895 [0x7fca994ad728] ERROR - Error issuing curl_easy_perform(handle): 7
May 12, 2021 20:10:21.895 [0x7fca994ad728] WARN - HTTP error requesting GET http://127.0.0.1:32400/library/changestamp (7, Couldn't connect to server) (Recv failure: Connection reset by peer)
May 12, 2021 20:10:21.895 [0x7fca994ad728] ERROR - HTTP -7 downloading url http://127.0.0.1:32400/library/changestamp
May 12, 2021 20:10:21.919 [0x7fca994ad728] ERROR - Exception thrown during analysis: Unable to allocate a changestamp from the server

Yeah… it crashes on a different file if I restart it… plus there is someone streaming so I’m not sure if that’s what is crashing it.

What can you tell about the file please ?

( mediainfo filename.ext please )

Any way of isolating helps

It looked like it was analyzing one file and scanning another when it crashed. I think the analyze file was the problem but I’m not 100% sure going to run it again. The analyzed file shows:

$ mediainfo Scan-130910-0032.tif
General
Complete name : Scan-130910-0032.tif
Format : TIFF
File size : 35.1 MiB

Image
Title : 1968 - India - Kukkal; Kerala; 1 of 3
Format : LZW
Format settings : Little
Width : 5 300 pixels
Height : 3 636 pixels
Color space : RGB
Bit depth : 8 bits
Compression mode : Lossless
Encoded date : 1968:10:10 00:00:00
Density : 530 dpi

$ exiftool Scan-130910-0032.tif
ExifTool Version Number : 12.18
File Name : Scan-130910-0032.tif
Directory : .
File Size : 35 MiB
File Modification Date/Time : 2021:05:12 17:25:06-06:00
File Access Date/Time : 2021:05:12 20:45:20-06:00
File Inode Change Date/Time : 2021:05:12 20:43:46-06:00
File Permissions : rwxrwxrwx
File Type : TIFF
File Type Extension : tif
MIME Type : image/tiff
Exif Byte Order : Little-endian (Intel, II)
Image Width : 5300
Image Height : 3636
Bits Per Sample : 8 8 8
Compression : LZW
Photometric Interpretation : RGB
Fill Order : Normal
Image Description : 1968 - India - Kukkal; Kerala; 1 of 3
Strip Offsets : 16432
Orientation : Horizontal (normal)
Samples Per Pixel : 3
Rows Per Strip : 3636
Strip Byte Counts : 36835724
X Resolution : 530
Y Resolution : 530
Planar Configuration : Chunky
Page Name : Transparency
Resolution Unit : inches
Page Number : 0 1
Modify Date : 1968:10:10 00:00:00
Predictor : Horizontal differencing
White Point : 0.3127000034 0.3289999962
Primary Chromaticities : 0.6399999857 0.3300000131 0.3000000119 0.6000000238 0.150000006 0.05999999866
About : uuid:faf5bdd5-ba3d-11da-ad31-d33d75182f1b
Creator Tool : Microsoft Windows Photo Viewer 6.2.9200.16384
Exif Version : 0232
Date/Time Original : 1968:10:10 00:00:00
Create Date : 1968:10:10 00:00:00
Components Configuration : Y, Cb, Cr, -
Flashpix Version : 0100
Color Space : Uncalibrated
Profile CMM Type : Linotronic
Profile Version : 2.1.0
Profile Class : Display Device Profile
Color Space Data : RGB
Profile Connection Space : XYZ
Profile Date Time : 1998:02:09 06:49:00
Profile File Signature : acsp
Primary Platform : Microsoft Corporation
CMM Flags : Not Embedded, Independent
Device Manufacturer : Hewlett-Packard
Device Model : sRGB
Device Attributes : Reflective, Glossy, Positive, Color
Rendering Intent : Perceptual
Connection Space Illuminant : 0.9642 1 0.82491
Profile Creator : Hewlett-Packard
Profile ID : 0
Profile Copyright : Copyright (c) 1998 Hewlett-Packard Company
Profile Description : sRGB IEC61966-2.1
Media White Point : 0.95045 1 1.08905
Media Black Point : 0 0 0
Red Matrix Column : 0.43607 0.22249 0.01392
Green Matrix Column : 0.38515 0.71687 0.09708
Blue Matrix Column : 0.14307 0.06061 0.7141
Device Mfg Desc : IEC http://www.iec.ch
Device Model Desc : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant : 19.6445 20.3718 16.8089
Viewing Cond Surround : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type : D50
Luminance : 76.03647 80 87.12462
Measurement Observer : CIE 1931
Measurement Backing : 0 0 0
Measurement Geometry : Unknown
Measurement Flare : 0.999%
Measurement Illuminant : D65
Technology : Cathode Ray Tube Display
Red Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve : (Binary data 2060 bytes, use -b option to extract)
Image Size : 5300x3636
Megapixels : 19.3

i will ask the engineer.

I do have one question.

1968 Creation date?

Yes… if you read above I had an issue with my photos not showing in the timeline correctly so based on another forum thread about this issue I ran this to set all the dates on my files in the 1968 folder:

exiftool -AllDates="1968:10:10 00:00:00" 1968*

Sorry it was a reddit post here:

That’s fine but working around one problem may have created another… I don’t know.; I don’t have a photo library.

Let me talk to one of the engineers , if available.

May I have the server logs ZIP which go with the excerpt shown above ?

I think you might be right… it seemed to scan OK before I did that. Not sure why it would care what the created date is if I deleted the library and recreated it from scratch though.

It’s a “date = epoch” function. when integer date = 0 (Jan 1, 1968), things tend to blow up because it predates all the technology which could have generated it.

That means it’s also possible 10/10/1968 - “Now” is a numerical value of seconds > 2^32 bits which the field allows

That makes sense I will try setting the dates back except ‘Date/TIme Original’.
I’m not 100% sure what meta plex is looking for to set date.

I tried messaging you the logs it says you aren’t accepting messages.
How do I submit it?

DM sent

Think I found it.

Linux is seeing this as a negative date :

Many Unix-like operating systems which keep time as seconds elapsed from the epoch date of 1 January 1970,