se1exin / Cleanarr

A simple UI to help find and delete duplicate and sample files from your Plex server
https://hub.docker.com/r/selexin/cleanarr
MIT License
218 stars 18 forks source link

Failed To Load Content (invalid request block size?) #135

Closed zdhoward closed 6 months ago

zdhoward commented 8 months ago

I have been trying to install this using docker compose on unRAID and keep hitting this issue, even when rolling back to older versions. Any advice is appreciated.

The error I get from the browser is

Failed to load content!
Please check your Plex settings and try again.

The compose yaml I am using to get this up and running is

version: "3"
services:
  cleanarr:
    image: selexin/cleanarr:latest
    container_name: cleanarr
    hostname: cleanarr
    networks:
      - gironet
    ports:
      - 5100:80
    environment:
      - BYPASS_SSL_VERIFY=1
      - PLEX_TOKEN=xxxxxxxx
      - PLEX_BASE_URL=http://192.168.5.5:32400
      - LIBRARY_NAMES=Movies;TV Shows
      - PLEX_TIMEOUT=10000
      - PAGE_SIZE=20
      - DEBUG=1
    volumes:
      - /mnt/user/appdata/cleanarr/config:/config
    restart: unless-stopped

networks:
  gironet:
    name: gironet
    external: true

So I looked through other similar issues and tried suggestions from there like using curl to see if my containers can see eachother and that my token is valid. Everything seems in order so I dug into the logs and found this

cleanarr  | invalid request block size: 6335 (max 4096)...skip
cleanarr  | 2024/03/26 16:00:22 [error] 11#11: *7 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.0.125, server: , request: "GET /content/dupes?page=10 HTTP/1.1", upstream: "uwsgi://unix:///tmp/uwsgi.sock:", host: "192.168.5.5:5100", referrer: "http://192.168.5.5:5100/"

And the full log: docker_log.txt

boomhaur commented 7 months ago

I am getting the same invalid request block size errors in my logs as well.

adamrbell commented 7 months ago

I was able to increase the buffer using the following commands:

From the command line (or ssh) enter the following to access the containers CLI docker exec -it Cleanarr /bin/bash (depening on your platform you might be able to jump to the CLI from your docker management page)

Once inside the contain we need to modify the uwsgi.ini file to include "buffer-size=32768". echo "buffer-size=32768" >> /app/uwsgi.ini

Exit the container with exit

Then restart it with docker restart Cleanarr

WARNING This is super janky because any change to the image will nuke the fix. Run the commands again to restore.

Hope this helps :)

se1exin commented 6 months ago

Hey ya'll, @robertlestak 's PR containing @adamrbell 's fix has been merged and is available in v2.5.2.

Please reopen this issue if the issue persists in v2.5.2 onwards.

adamrbell commented 6 months ago

Updated and "works for me" ™️

Thanks guys