Server Version: Latest docker image as of this writing
Player Version: Web UI
I have some media files, managed by Sonarr. I recently added Plex as a streaming layer. I noticed the plex media server crashing with some very odd behavior. After adding the new library (of TV shows) and some scanning:
- a new media server crash report is generated
- a large amount of libraries are created with random numbers as names (no specific order). e.g. 80, 802, 331, β¦
- the media server crashes upon restarts etc.
- deleting the local database helps restore access
Here is the docker logs after deleting all local databases in /Plug in Support/Databases/
and trying to re-add the library:
juanca@PLAYAPRO servarr % docker-compose up plex
[+] Building 0.0s (0/0) docker:desktop-linux
[+] Running 1/0
β Container servarr-plex-1 Created 0.0s
Attaching to servarr-plex-1
servarr-plex-1 | [migrations] started
servarr-plex-1 | [migrations] no migrations found
servarr-plex-1 | usermod: no changes
servarr-plex-1 | βββββββββββββββββββββββββββββββββββββββ
servarr-plex-1 |
servarr-plex-1 | βββ βββββββββββ βββββββ
servarr-plex-1 | βββ ββββββββββββββββββββ
servarr-plex-1 | βββ ββββββββββββββ βββ
servarr-plex-1 | βββ ββββββββββββββ βββ
servarr-plex-1 | ββββββββββββββββββββββββββββ
servarr-plex-1 | βββββββββββββββββββ βββββββ
servarr-plex-1 |
servarr-plex-1 | Brought to you by linuxserver.io
servarr-plex-1 | βββββββββββββββββββββββββββββββββββββββ
servarr-plex-1 |
servarr-plex-1 | To support LSIO projects visit:
servarr-plex-1 | https://www.linuxserver.io/donate/
servarr-plex-1 |
servarr-plex-1 | βββββββββββββββββββββββββββββββββββββββ
servarr-plex-1 | GID/UID
servarr-plex-1 | βββββββββββββββββββββββββββββββββββββββ
servarr-plex-1 |
servarr-plex-1 | User UID: 1000
servarr-plex-1 | User GID: 1000
servarr-plex-1 | βββββββββββββββββββββββββββββββββββββββ
servarr-plex-1 |
servarr-plex-1 | **** Server already claimed ****
servarr-plex-1 | Docker is used for versioning skip update check
servarr-plex-1 | [custom-init] No custom files found, skipping...
servarr-plex-1 | Starting Plex Media Server. . . (you can ignore the libusb_init error)
servarr-plex-1 | [ls.io-init] done.
servarr-plex-1 | Critical: libusb_init failed
servarr-plex-1 | ****** PLEX MEDIA SERVER CRASHED, CRASH REPORT WRITTEN: /config/Library/Application Support/Plex Media Server/Crash Reports/1.32.7.7621-871adbd44/PLEX MEDIA SERVER/2562639e-25d9-4595-119f3a8f-5fc729b8.dmp
servarr-plex-1 | Sqlite3: Sleeping for 200ms to retry busy DB.
servarr-plex-1 | Starting Plex Media Server. . . (you can ignore the libusb_init error)
servarr-plex-1 | The '--scan' operation is deprecated and will be removed in future versions of Plex Media Server.
servarr-plex-1 | Critical: libusb_init failed
^CGracefully stopping... (press Ctrl+C again to force)
Aborting on container exit...
[+] Stopping 1/1
And here is some snippet of the log file. I can provide the full thing upon request.
Nov 01, 2023 02:51:35.020 [140191592344376] DEBUG - Found existing show 22
Nov 01, 2023 02:51:35.021 [140191592344376] DEBUG - Added new metadata item () with ID 400
Nov 01, 2023 02:51:35.021 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 398 added, 0 deleted
Nov 01, 2023 02:51:35.115 [140191592344376] DEBUG - Looking for path match for [/data/media/tv/One Piece/One Piece S09E52 Now Heading Towards the Blue Sea! Memories of an Interwoven Finale.mkv]
Nov 01, 2023 02:51:35.117 [140191592344376] DEBUG - Skipping hash check, no size match for 303952899 bytes.
Nov 01, 2023 02:51:35.117 [140191592344376] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.117 [140191592344376] DEBUG - Found existing show 22
Nov 01, 2023 02:51:35.119 [140191592344376] DEBUG - Added new metadata item () with ID 401
Nov 01, 2023 02:51:35.120 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 399 added, 0 deleted
Nov 01, 2023 02:51:35.190 [140191592344376] DEBUG - [Database analyze/com.plexapp.plugins.library.db] Database analyze: starting analyze (all tables)
Nov 01, 2023 02:51:35.194 [140191592344376] ERROR - [Database analyze/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 11, database corruption at line 69165 of [a29f994989]
Nov 01, 2023 02:51:35.194 [140191592344376] ERROR - [Database analyze/com.plexapp.plugins.library.db] SQLITE3:0x80000001, 11, statement aborts at 1170: [analyze] database disk image is malformed
Nov 01, 2023 02:51:35.194 [140191592344376] ERROR - Native Scanner: Exception executing stage Add to Database: sqlite3_statement_backend::loadOne: database disk image is malformed
Nov 01, 2023 02:51:35.194 [140191592344376] DEBUG - Native Scanner: Executed Add to Database stage in 5.57 sec.
Nov 01, 2023 02:51:35.194 [140191592344376] DEBUG - Media Analyzer: Item 358 is already in progress.
Nov 01, 2023 02:51:35.194 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E01.Romance.Dawn.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.195 [140191583734584] DEBUG - Media Analyzer: Performing on-the-fly analysis on 47 items.
Nov 01, 2023 02:51:35.195 [140191583734584] DEBUG - [JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/a31c019-4614-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Media Scanner" --analyze --log-file-suffix " Analysis" --no-thumbs --item 355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401
Nov 01, 2023 02:51:35.195 [140191619832632] DEBUG - Native Scanner: Executed Local Metadata stage in 0.00 sec.
Nov 01, 2023 02:51:35.195 [140191583734584] DEBUG - [JobRunner] Jobs: Starting child process with pid 656
Nov 01, 2023 02:51:35.195 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.196 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.196 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.197 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.197 [140191617657656] DEBUG - Skipping hash check, no size match for 2667555037 bytes.
Nov 01, 2023 02:51:35.197 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.198 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.198 [140191617657656] DEBUG - Checking descendants of ONE PIECE (2023)
Nov 01, 2023 02:51:35.198 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.199 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.199 [140191617657656] DEBUG - Creating show 'ONE PIECE (2023)'
Nov 01, 2023 02:51:35.199 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:35.200 [140191617657656] DEBUG - Added new metadata item (ONE PIECE (2023)) with ID 402
Nov 01, 2023 02:51:35.201 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 400 added, 0 deleted
Nov 01, 2023 02:51:35.201 [140191617657656] DEBUG - Creating season 1 for show 'ONE PIECE (2023)'
Nov 01, 2023 02:51:35.202 [140191617657656] DEBUG - Added new metadata item () with ID 403
Nov 01, 2023 02:51:35.203 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 401 added, 0 deleted
Nov 01, 2023 02:51:35.204 [140191617657656] DEBUG - Added new metadata item (ROMANCE DAWN) with ID 404
Nov 01, 2023 02:51:35.205 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 402 added, 0 deleted
Nov 01, 2023 02:51:35.311 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E02.The.Man.in.the.Straw.Hat.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.313 [140191617657656] DEBUG - Skipping hash check, no size match for 2269070499 bytes.
Nov 01, 2023 02:51:35.313 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.313 [140191617657656] DEBUG - Found existing show 402
Nov 01, 2023 02:51:35.315 [140191617657656] DEBUG - Added new metadata item (THE MAN IN THE STRAW HAT) with ID 405
Nov 01, 2023 02:51:35.316 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 403 added, 0 deleted
Nov 01, 2023 02:51:35.352 [140191602891576] DEBUG - [MetadataAgent/tv.plex.agents.series] Found 1 provider matches for 'The Boys'.
Nov 01, 2023 02:51:35.352 [140191602891576] DEBUG - Scanner [Plex TV Series]: found cloud match for file '/data/media/tv/The Boys/The Boys S01E01 The Name of the Game 1080p BDrip x265 DTS-HD MA 5.1 D0ct0rLew[SEV].mkv': 'The Boys'
Nov 01, 2023 02:51:35.352 [140191602891576] DEBUG - Native Scanner: Executed Cloud Match stage in 0.16 sec.
Nov 01, 2023 02:51:35.406 [140191579515704] DEBUG - Request: [127.0.0.1:36120 (Loopback)] GET /library/changestamp (3 live) #6f1 GZIP Signed-in Token (mrjuanca)
Nov 01, 2023 02:51:35.407 [140191657057080] DEBUG - Completed: [127.0.0.1:36120] 200 GET /library/changestamp (3 live) #6f1 GZIP 0ms 417 bytes (pipelined: 1)
Nov 01, 2023 02:51:35.408 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E03.Tell.No.Tales.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.410 [140191617657656] DEBUG - Skipping hash check, no size match for 2388859743 bytes.
Nov 01, 2023 02:51:35.410 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.410 [140191617657656] DEBUG - Found existing show 402
Nov 01, 2023 02:51:35.411 [140191617657656] DEBUG - Added new metadata item (TELL NO TALES) with ID 406
Nov 01, 2023 02:51:35.412 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 404 added, 0 deleted
Nov 01, 2023 02:51:35.429 [140191579515704] DEBUG - Request: [127.0.0.1:36120 (Loopback)] GET /:/metadata/flushMetadataCounterCache?metadataItemID=22 (3 live) #836 GZIP Signed-in Token (mrjuanca)
Nov 01, 2023 02:51:35.429 [140191659166520] DEBUG - Completed: [127.0.0.1:36120] 200 GET /:/metadata/flushMetadataCounterCache?metadataItemID=22 (3 live) #836 GZIP 0ms 195 bytes (pipelined: 2)
Nov 01, 2023 02:51:35.498 [140191663930168] DEBUG - Jobs: '/usr/lib/plexmediaserver/Plex Media Scanner' exit code for process 656 is 0 (success)
Nov 01, 2023 02:51:35.498 [140191583734584] DEBUG - Killing job.
Nov 01, 2023 02:51:35.498 [140191583734584] DEBUG - Signalling job ID 656 with 9
Nov 01, 2023 02:51:35.498 [140191583734584] DEBUG - Media Analyzer: Background analysis completed in 0.3 seconds, removing 47 IDs
Nov 01, 2023 02:51:35.498 [140191592344376] DEBUG - MetadataAgentPostProcessor: adding id 354 to refresh queue (0 items in queue)
Nov 01, 2023 02:51:35.498 [140191592344376] DEBUG - Native Scanner: Executed Media Analysis stage in 0.30 sec.
Nov 01, 2023 02:51:35.526 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E04.The.Pirates.Are.Coming.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.528 [140191617657656] DEBUG - Skipping hash check, no size match for 2602124044 bytes.
Nov 01, 2023 02:51:35.528 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.529 [140191617657656] DEBUG - Found existing show 402
Nov 01, 2023 02:51:35.530 [140191617657656] DEBUG - Added new metadata item (THE PIRATES ARE COMING) with ID 407
Nov 01, 2023 02:51:35.531 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 405 added, 0 deleted
Nov 01, 2023 02:51:35.595 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E05.Eat.at.Baratie.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.599 [140191617657656] DEBUG - Skipping hash check, no size match for 2086160414 bytes.
Nov 01, 2023 02:51:35.599 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.599 [140191617657656] DEBUG - Found existing show 402
Nov 01, 2023 02:51:35.601 [140191617657656] DEBUG - Added new metadata item (EAT AT BARATIE!) with ID 408
Nov 01, 2023 02:51:35.601 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 406 added, 0 deleted
Nov 01, 2023 02:51:35.678 [140191605001016] DEBUG - Activity: registered new activity b957efbb-7165-43b3-9c25-af701b14af05 - "Updating Metadata"
Nov 01, 2023 02:51:35.681 [140191605001016] ERROR - SQLITE3:0x80000001, 11, database corruption at line 69165 of [a29f994989]
Nov 01, 2023 02:51:35.681 [140191605001016] ERROR - SQLITE3:0x80000001, 11, statement aborts at 23: [select media_items.id as 'media_items_id', media_items.library_section_id as 'media_items_library_section_id', media_items.section_location_id as 'media_items_section_location_id', media_items.metadata_item_id as 'media_items_metadata_item_id', media_items.type_id as 'media_items_type_id', media_items.width as 'media_items_width', media_items.height as 'media_items_height', media_items.size as 'media_items_size', media_items.duration as 'media_items_duration', media_items.bitrate as 'media_items_bitrate', media_items.container as 'media_items_container', media_items.video_codec as 'media_items_video_codec', media_items.audio_codec as 'media_items_audio_codec', media_items.display_aspect_ratio as 'media_items_display_aspect_ratio', m
Nov 01, 2023 02:51:35.684 [140191605001016] DEBUG - Activity: Ended activity b957efbb-7165-43b3-9c25-af701b14af05.
Nov 01, 2023 02:51:35.686 [140191605001016] ERROR - Thread: Uncaught exception running async task which was spawned by thread 140191592344376: sqlite3_statement_backend::loadRS: database disk image is malformed
Nov 01, 2023 02:51:35.754 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E06.The.Chef.and.the.Chore.Boy.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.756 [140191617657656] DEBUG - Skipping hash check, no size match for 2238791087 bytes.
Nov 01, 2023 02:51:35.756 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.757 [140191617657656] DEBUG - Found existing show 402
Nov 01, 2023 02:51:35.760 [140191617657656] DEBUG - Added new metadata item (THE CHEF AND THE CHORE BOY) with ID 409
Nov 01, 2023 02:51:35.761 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 407 added, 0 deleted
Nov 01, 2023 02:51:35.868 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E07.The.Girl.with.the.Sawfish.Tattoo.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.870 [140191617657656] DEBUG - Skipping hash check, no size match for 2405187510 bytes.
Nov 01, 2023 02:51:35.870 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.870 [140191617657656] DEBUG - Found existing show 402
Nov 01, 2023 02:51:35.872 [140191617657656] DEBUG - Added new metadata item (THE GIRL WITH THE SAWFISH TATTOO) with ID 410
Nov 01, 2023 02:51:35.873 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 408 added, 0 deleted
Nov 01, 2023 02:51:35.934 [140191617657656] DEBUG - Looking for path match for [/data/media/tv/ONE PIECE (2023)/One.Piece.2023.S01E08.Worst.in.the.East.1080p.NF.WEB-DL.DD+5.1.Atmos.H.264-playWEB.mkv]
Nov 01, 2023 02:51:35.935 [140191617657656] DEBUG - Skipping hash check, no size match for 2087258095 bytes.
Nov 01, 2023 02:51:35.935 [140191617657656] DEBUG - No match for hash.
Nov 01, 2023 02:51:35.936 [140191617657656] DEBUG - Found existing show 402
Nov 01, 2023 02:51:35.937 [140191617657656] DEBUG - Added new metadata item (WORST IN THE EAST) with ID 411
Nov 01, 2023 02:51:35.938 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 409 added, 0 deleted
Nov 01, 2023 02:51:36.248 [140191617657656] DEBUG - Native Scanner: Executed Add to Database stage in 1.05 sec.
Nov 01, 2023 02:51:36.248 [140191583734584] DEBUG - Media Analyzer: Performing on-the-fly analysis on 8 items.
Nov 01, 2023 02:51:36.248 [140191602891576] DEBUG - Looking for path match for [/data/media/tv/The Boys/The Boys S01E01 The Name of the Game 1080p BDrip x265 DTS-HD MA 5.1 D0ct0rLew[SEV].mkv]
Nov 01, 2023 02:51:36.248 [140191583734584] DEBUG - [JobRunner] Job running: FFMPEG_EXTERNAL_LIBS='/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/a31c019-4614-linux-x86_64/' X_PLEX_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx "/usr/lib/plexmediaserver/Plex Media Scanner" --analyze --log-file-suffix " Analysis" --no-thumbs --item 404,405,406,407,408,409,410,411
Nov 01, 2023 02:51:36.248 [140191592344376] DEBUG - Native Scanner: Executed Local Metadata stage in 0.00 sec.
Nov 01, 2023 02:51:36.248 [140191661275960] DEBUG - Activity: updated activity 35efaa2b-2bed-41fd-af09-6bfe5ddcea58 - completed 66.0% - Scanning TV Shows
Nov 01, 2023 02:51:36.248 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.248 [140191583734584] DEBUG - [JobRunner] Jobs: Starting child process with pid 662
Nov 01, 2023 02:51:36.249 [140191661275960] DEBUG - Scanner: Processing directory /data/media/tv/The Expanse (parent: yes)
Nov 01, 2023 02:51:36.249 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.250 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.250 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.250 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.251 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.251 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.251 [140191602891576] DEBUG - Skipping hash check, no size match for 4989364005 bytes.
Nov 01, 2023 02:51:36.251 [140191602891576] DEBUG - No match for hash.
Nov 01, 2023 02:51:36.252 [140191619832632] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.254 [140191602891576] DEBUG - Checking descendants of The Boys
Nov 01, 2023 02:51:36.254 [140191602891576] DEBUG - Creating show 'The Boys'
Nov 01, 2023 02:51:36.257 [140191602891576] DEBUG - Added new metadata item (The Boys) with ID 412
Nov 01, 2023 02:51:36.258 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 410 added, 0 deleted
Nov 01, 2023 02:51:36.258 [140191602891576] DEBUG - Creating season 1 for show 'The Boys'
Nov 01, 2023 02:51:36.259 [140191602891576] DEBUG - Added new metadata item () with ID 413
Nov 01, 2023 02:51:36.260 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 411 added, 0 deleted
Nov 01, 2023 02:51:36.261 [140191661275960] DEBUG - Scanner: Processing directory /data/media/tv/The Expanse/Season 1 (parent: yes)
Nov 01, 2023 02:51:36.262 [140191602891576] DEBUG - Added new metadata item (The Name of the Game) with ID 414
Nov 01, 2023 02:51:36.262 [140191596563256] DEBUG - [LibraryTimeline] Scanner activity on section 1: 412 added, 0 deleted
Nov 01, 2023 02:51:38.424 [140191579515704] DEBUG - Request: [127.0.0.1:36128 (Loopback)] GET /library/changestamp (3 live) #835 GZIP Signed-in Token (mrjuanca)
Nov 01, 2023 02:51:38.425 [140191657057080] DEBUG - Completed: [127.0.0.1:36128] 200 GET /library/changestamp (3 live) #835 GZIP 1ms 417 bytes (pipelined: 1)
Nov 01, 2023 02:51:38.425 [140191619832632] DEBUG - [MetadataAgent/tv.plex.agents.series] Found 1 provider matches for 'The Boys'.