recyclarr / recyclarr

Automatically sync TRaSH Guides to your Sonarr and Radarr instances
https://recyclarr.dev
MIT License
1.11k stars 31 forks source link

Error running recyclarr #206

Closed BaukeZwart closed 1 year ago

BaukeZwart commented 1 year ago

Is there an existing issue for this?

Current Behavior

Not sure if this error was caused by a bug or just bad timing. Made a few minor changes (mainly removing a few white spaces) to my config and when running it had this error. Ran it again a few seconds later without making any change to the config and it ran fine.

https://logs.notifiarr.com/?fe867b06a3c5085c#AcvE4pLwJhVEa7qcvCMnEyAG95VbPQ2Rsq79SHc3E6t2

Expected Behavior

Run without errors.

Steps To Reproduce

ran sudo docker-compose run --rm recyclarr sync

Environment & Versions

- Operating System: Linux (Synology DSM 7.1)
- Architecture: arm64
- Recyclarr Version: 5.3.1
- Recyclarr Build: Docker
- Sonarr Version: 4.0.0.646
- Radarr Version: 5.0.0.7947

Recyclarr Log File(s)

Debug: https://logs.notifiarr.com/?1c23cad0f7818d60#CC5ZM4qZnAEaRnnsivnWRbNAtw3L4qcm7rBNkJU9NR3B Verbose: https://logs.notifiarr.com/?3598c5887c3c012d#HgDkNJL24mt3JwcACqDRzqyfDq531H3TiRHzHzhky5dA

Configuration YAML

# yaml-language-server: $schema=https://raw.githubusercontent.com/recyclarr/recyclarr/master/schemas/config-schema.json

# Instance Definition
# This section defines your instance type, name, and authentication
# Documentation: https://recyclarr.dev/wiki/yaml/config-reference/#basic
radarr:
  sqp-2:
    base_url: !secret radarr_url
    api_key: !secret radarr_apikey

# Quality Definition
# This section defines the Quality Definitions that will be used in your Radarr instance
# Only one set of Quality Definitions can be used per instance
# Documentation: https://recyclarr.dev/wiki/yaml/config-reference/#quality-def-settings
    quality_definition:
      type: sqp-uhd

# Quality Profiles
# This section creates and/or updates Quality Profile(s) in your Radarr instance
# Documentation: https://recyclarr.dev/wiki/yaml/config-reference/#quality-profiles
    quality_profiles:
      - name: SQP-2
        reset_unmatched_scores:
          enabled: true
          except:
            - "!LQ"
        upgrade:
          allowed: true
          until_quality: WEB|Remux|Bluray|2160p
          until_score: 10000
        min_format_score: 550
        quality_sort: top
        qualities:
          - name: WEB|Remux|Bluray|2160p
            qualities:
              - WEBDL-2160p
              - WEBRip-2160p
              - Bluray-2160p
              - Remux-2160p
              - WEBDL-1080p
              - WEBRip-1080p
          - name: Remux-1080p

# Custom Formats
# This section creates and/or updates Custom Formats in your Radarr instance,
# and applies them and their scores to Quality Profiles
# Documentation: https://recyclarr.dev/wiki/yaml/config-reference/#custom-format-settings
    custom_formats:
      # Audio
      - trash_ids:
          - 496f355514737f7d83bf7aa4d24f8169  # TrueHD Atmos
          - 2f22d89048b01681dde8afe203bf2e95  # DTS X
          - 417804f7f2c4308c1f4c5d380d4c4475  # ATMOS (undefined)
          - 1af239278386be2919e1bcee0bde047e  # DD+ ATMOS
          - 3cafb66171b47f226146a0770576870f  # TrueHD
          - dcf3ec6938fa32445f590a4da84256cd  # DTS-HD MA
          - a570d4a0e56a2874b64e5bfa55202a1b  # FLAC
          - e7c2fcae07cbada050a0af3357491d7b  # PCM
          - 8e109e50e0a0b83a5098b056e13bf6db  # DTS-HD HRA
          - 185f1dd7264c4562b9022d963ac37424  # DD+
          - f9f847ac70a0af62ea4a08280b859636  # DTS-ES
          - 1c1a4c5e823891c75bc50380a6866f73  # DTS
          - 240770601cc226190c367ef59aba7463  # AAC
          - c2998bd0d90ed5621d8df281e839436e  # DD

      # HDR Formats
          - e23edd2482476e595fb990b12e7c609c  # DV HDR10
          - 58d6a88f13e2db7f5059c41047876f00  # DV
          - 55d53828b9d81cbe20b02efd00aa0efd  # DV HLG
          - a3e19f8f627608af0211acd02bf89735  # DV SDR
          - b974a6cd08c1066250f1f177d7aa1225  # HDR10+
          - dfb86d5941bc9075d6af23b09c2aeecd  # HDR10
          - e61e28db95d22bedcadf030b8f156d96  # HDR
          - 2a4d9069cc1fe3242ff9bdaebed239bb  # HDR (undefined)
          - 08d6d8834ad9ec87b1dc7ec8148e7a1f  # PQ
          - 9364dd386c9b4a1100dde8264690add7  # HLG
        quality_profiles:
          - name: SQP-2

      - trash_ids:
          # DV (WEBDL)
          - 923b6abef9b17f937fab56cfcf89e1f1  # DV (WEBDL)
        quality_profiles:
          - name: SQP-2
            # If you and all of your users have a setup that fully supports DV, then uncomment the
            # next line to override the default DV (WEBDL) score of -10000
            score: 0

      # Movie Versions
      - trash_ids:
          - 0f12c086e289cf966fa5948eac571f44  # Hybrid
          - f700d29429c023a5734505e77daeaea7  # DV (FEL)
          - 570bc9ebecd92723d2d21500f4be314c  # Remaster
          - eca37840c13c6ef2dd0262b141a5482f  # 4K Remaster
          - e0c07d59beb37348e975a930d5e50319  # Criterion Collection
          - 9d27d9d2181838f76dee150882bdc58c  # Masters of Cinema
          - db9b4c4b53d312a3ca5f1378f6440fc9  # Vinegar Syndrome
          - 957d0f44b592285f26449575e8b1167e  # Special Edition
          - eecf3a857724171f968a66cb5719e152  # IMAX
          # Uncomment the next line if you prefer IMAX Enhanced releases
          - 9f6cbff8cfe4ebbc1bde14c7b7bec0de  # IMAX Enhanced

      # HQ Release Groups
          - 3a3ff47579026e76d6504ebea39390de  # Remux Tier 01
          - 9f98181fe5a3fbeb0cc29340da2a468a  # Remux Tier 02
          - 8baaf0b3142bf4d94c42a724f034e27a  # Remux Tier 03
        quality_profiles:
          - name: SQP-2

      - trash_ids:
          - 4d74ac4c4db0b64bff6ce0cffef99bf0  # UHD Bluray Tier 01
        quality_profiles:
          - name: SQP-2
            score: 2300

      - trash_ids:
          - a58f517a70193f8e578056642178419d  # UHD Bluray Tier 02
        quality_profiles:
          - name: SQP-2
            score: 2200

      - trash_ids:
          - e71939fae578037e7aed3ee219bbe7c1  # UHD Bluray Tier 03
        quality_profiles:
          - name: SQP-2
            score: 2100

      - trash_ids:
          - c20f169ef63c5f40c2def54abaf4438e  # WEB Tier 01
          - 403816d65392c79236dcb6dd591aeda4  # WEB Tier 02
          - af94e0fe497124d1f9ce732069ec8c3b  # WEB Tier 03

      # Misc
          - e7718d7a3ce595f289bfee26adc178f5  # Repack/Proper
          - ae43b294509409a6a13919dedd4764c4  # Repack2
        quality_profiles:
          - name: SQP-2

      - trash_ids:
          - 2899d84dc9372de3408e6d8cc18e9666  # x264
        quality_profiles:
          - name: SQP-2
            score: -10000

      # Unwanted
      - trash_ids:
          - ed38b889b31be83fda192888e2286d83  # BR-DISK
          - 90a6f9a284dff5103f6346090e6280c8  # LQ
          - 839bea857ed2c0a8e084f3cbdbd65ecb  # x265 (no HDR/DV)
          - b8cd450cbfa689c0259a01d9e29ba3d6  # 3D
          - bfd8eb01832d646a0a89c4deb46f8564  # Upscaled
          - 9c38ebb7384dada637be8899efa68e6f  # SDR

      # Optional
          # Uncomment any of the following optional custom formats if you want them to be added to
          # the quality profile
          - b6832f586342ef70d9c128d40c07b872    # Bad Dual Groups
          # Uncomment the below line if you have a setup that supports HDR10+
          # - b17886cb4158d9fea189859409975758  # HDR10+ Boost
          - 90cedc1fea7ea5d11298bebd3d1d3223    # EVO (no WEBDL)
          - ae9b7c9ebde1f3bd336a8cbd1ec4c5e5    # No-RlsGroup
          # - 7357cf5161efbf8c4d5d0c30b4815ee2  # Obfuscated
          - 5c44f52a8714fdd79bb4d98e2673be1f    # Retags
          # - f537cf427b64c38c8e36298f657e4828  # Scene
          # - 0a3f082873eb454bde444150b70253cc  # Extras
        quality_profiles:
          - name: SQP-2

      # Resolution
      - trash_ids:
          - 820b09bb9acbfde9c35c71e0e565dad8  # 1080p
        quality_profiles:
          - name: SQP-2

      - trash_ids:
          - fb392fb0d61a010ae38e49ceaa24a1ef  # 2160p
        quality_profiles:
          - name: SQP-2
            score: 151

      # Streaming Services
      - trash_ids:
          - cc5e51a9e85a6296ceefe097a77f12f4  # BCORE
          - 2a6039655313bf5dab1e43523b62c374  # MA
          - 16622a6911d1ab5d5b8b713d5b0036d4  # CRiT
        quality_profiles:
          - name: SQP-2

      - trash_ids:
          # Streaming Services
          - b3b3a6ac74ecbd56bcdbefa4799fb9df  # AMZN
          - 40e9380490e748672c2522eaaeb692f7  # ATVP
          - f6ff65b3f4b464a79dcc75950fe20382  # CRAV
          - 84272245b2988854bfb76a16e60baea5  # DSNP
          - 509e5f41146e278f9eab1ddaceb34515  # HBO
          - 5763d1b0ce84aff3b21038eea8e9b8ad  # HMAX
          - 526d445d4c16214309f0fd2b3be18a89  # Hulu
          - 6a061313d22e51e0f25b7cd4dc065233  # MAX
          - 170b1d363bd8516fbf3a3eb05d4faff6  # NF
          - fbca986396c5e695ef7b2def3c755d01  # OViD
          - bf7e73dd1d85b12cc527dc619761c840  # Pathe
          - c9fd353f8f5f1baf56dc601c4cb29920  # PCOK
          - e36a0ba1bc902b26ee40818a1d59b8bd  # PMTP
          - c2863d2a50c9acad1fb50e53ece60817  # STAN
        quality_profiles:
          - name: SQP-2
            score: 0

      # manually set score
      - trash_ids:
          - f537cf427b64c38c8e36298f657e4828   # Scene
        quality_profiles:
          - name: SQP-2
            score: 0

      # Manually added
      - trash_ids:
         - e098247bc6652dd88c76644b275260ed    # Flux
        quality_profiles:
          - name: SQP-2

Sonarr / Radarr Logs

https://logs.notifiarr.com/?08a16d501e7fe93d#5du7wdyUdsCjaRDuwFutW9j7TDpKGxWtQkqBjsV57ZYo

snoopy82481 commented 1 year ago

All logs point to message = System.Data.SQLite.SQLiteException (0x87AF00AA): database is locked\ndatabase is locked So it is related to having Radarr using "network" storage and SQLite being what it is. But it isn't Recyclarr related.

rcdailey commented 1 year ago

Thanks for the report. I can confirm there's a bug in Recyclarr that I need to fix. In 5.x, I introduced some code to try to read error response information that Sonarr & Radarr send down and present that to the user. This adds some helpful context (when it works). The problem here is that the error information is sent down in a different format than I was expecting, so it fails.

The good news is that this is only a bug that happens when there's a HTTP 500 failure in Radarr. So Recyclarr should function perfectly fine when there's no issues in Radarr.

Ultimately, you need to find out why your DB is being locked. Usually this means that the database is on slow storage or something and Recyclarr is running too fast for it.

BaukeZwart commented 1 year ago

Looking at the time this happened, I probably was testing the recyclarr at the same time a torrent export/import was running. Then lots of data was being copied from a seedbox to my local server running recyclarr and the arrs. When everything is running on a cron that will never be all running in the same time frame.