I-am-PUID-0 / pd_zurg

A combined docker image for the unified deployment of itsToggle's, yowmamasita's, and ncw's projects -- plex_debrid, zurg, and rclone
MIT License
173 stars 14 forks source link

Very heavy amount of meta data requests to plex #76

Closed taylowi-personal closed 3 weeks ago

taylowi-personal commented 3 weeks ago

Describe the bug

My plex server is receiving around 50-100 requests per second for metadata:

Completed: [172.27.0.2:38460] 200 GET /library/metadata/xxx/allLeaves (18 live) #bf312 GZIP Page 0-99 4ms 3211 bytes (pipelined: 60281)
Request: [172.27.0.2:57514 (WAN)] GET /library/metadata/xxx/matches?manual=1&title=tmdb-255451&agent=tv.plex.agents.series&language=en-US (18 live) #bf21f GZIP Signed-in Token (USER) (DEVICE)

This is causing my server to work extremely hard.

I cannot satisfactorily see what process from pd_zurg is making these requests.

Expected behavior

Less requests to plex for meta data, not sure why this happens or if there is something i can do to stop/slow/less frequently request this meta data from plex.

Additional context

The library is not massive with maybe a 1000 individual titles

Here is my docker compose:

services:
  pd_zurg:
    container_name: pd_zurg
    image: iampuid0/pd_zurg:latest
    ## Optionally, specify a specific version of pd_zurg
    # image: iampuid0/pd_zurg:2.0.0
    stdin_open: true # docker run -i
    tty: true        # docker run -t    
    volumes:
      ## Location of configuration files. If a Zurg config.yml and/or Zurg app is placed here, it will be used to override the default configuration and/or app used at startup. 
      - /pd_zurg/config:/config
      ## Location for logs
      - /pd_zurg/log:/log
      ## Location for rclone cache if enabled
      - /pd_zurg/cache:/cache
      ## Location for Zurg RealDebrid active configuration
      - /pd_zurg/RD:/zurg/RD
      ## Location for Zurg AllDebrid active configuration -- when supported by Zurg     
      - /pd_zurg/AD:/zurg/AD   
      ## Location for rclone mount to host
      - /mnt/pd_zurg:/data:shared       
    environment:
      - TZ=Europe/Berlin
      - PUID=1000
      - PGID=1000
      ## Zurg Required Settings
      - ZURG_ENABLED=true
      - RD_API_KEY=REDACTED
      ## Zurg Optional Settings
      - ZURG_LOG_LEVEL=INFO
     # - ZURG_VERSION=v0.9.2-hotfix.4
      - ZURG_PORT=9997
      - ZURG_UPDATE=true
      - PLEX_REFRESH=true
      - PLEX_MOUNT_DIR=/mnt/pd_zurg/pd_zurg
     # - ZURG_USER=
     # - ZURG_PASS=
      ## Rclone Required Settings
      - RCLONE_MOUNT_NAME=pd_zurg
      ## Rclone Optional Settings - See rclone docs for full list
     # - NFS_ENABLED=true
     # - NFS_PORT=8000
      - RCLONE_LOG_LEVEL=DEBUG
      - RCLONE_CACHE_DIR=/cache
     # - RCLONE_DIR_CACHE_TIME=10s
      - RCLONE_VFS_CACHE_MODE=writes
      - RCLONE_VFS_CACHE_MAX_SIZE=50G
     # - RCLONE_ATTR_TIMEOUT=8700h
      # - RCLONE_BUFFER_SIZE=64M
      - RCLONE_VFS_CACHE_MAX_AGE=4h
     # - RCLONE_VFS_READ_CHUNK_SIZE=32M
      - RCLONE_VFS_READ_CHUNK_SIZE_LIMIT=1G
     # - RCLONE_TRANSFERS=8
      ## Plex Debrid Required Settings
      - PD_ENABLED=true
      ## To utilize plex_debrid with Plex, the following environment variables are required
      - PLEX_USER=REDACTED
      - PLEX_TOKEN=REDACTED
      - PLEX_ADDRESS=http://REDACTED:32400
      ## To utilize plex_debrid with Jellyfin, the following environment variables are required - Note that plex_debrid will require addtional setup befor use with Jellyfin
     # - JF_ADDRESS
     # - JF_API_KEY
      ## Plex Debrid Optional Settings
      - PD_UPDATE=true
      - SHOW_MENU=false
     # - SEERR_API_KEY=
     # - SEERR_ADDRESS=
      ## Special Features
     # - AUTO_UPDATE_INTERVAL=12
     # - DUPLICATE_CLEANUP=true
     # - CLEANUP_INTERVAL=1
      # - PDZURG_LOG_LEVEL=DEBUG
     # - PDZURG_LOG_COUNT=2
    # Example to attach to gluetun vpn container if realdebrid blocks IP address 
    network_mode: container:gluetun_debrid
    devices:
      - /dev/fuse:/dev/fuse:rwm
    cap_add:
      - SYS_ADMIN     
    security_opt:
      - apparmor:unconfined    
      - no-new-privileges%