jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.37k stars 355 forks source link

[BUG] Web GUI fails to upload large PDF files #1530

Open megacorvega opened 2 years ago

megacorvega commented 2 years ago

Describe the bug Large pdf files (1GB +) fail to upload when using the web interface GUI, every attempt errors out.

To Reproduce Steps to reproduce the behavior:

  1. Drag large PDF file to GUI uploader on paperless-ng local site
  2. Begins upload showing Upoloading... where the green bar is progressing
  3. Errors out with HTTP error: 0 Unknown Error

Expected behavior I have uploaded 4 other smaller PDFs without issue. These large files are the only ones that error out. I am able to upload the document manually by placing it in the consume folder and executing the following:

sudo docker exec -it paperless_webserver_1 /bin/bash python3 manage.py document_consumer

Relevant information

version: "3.4"
services:
  broker:
    image: redis:6.0
    restart: unless-stopped

  db:
    image: postgres:13
    restart: unless-stopped
    volumes:
      - pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: paperless
      POSTGRES_USER: paperless
      POSTGRES_PASSWORD: paperless

  webserver:
    image: jonaswinkler/paperless-ng:latest
    restart: unless-stopped
    depends_on:
      - db
      - broker
      - gotenberg
      - tika
    ports:
      - 80:8000
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8000"]
      interval: 30s
      timeout: 10s
      retries: 5
    volumes:
      - /home/<user>/png-vault/data:/usr/src/paperless/data
      - /home/<user>/png-vault/media:/usr/src/paperless/media
      - ./export:/usr/src/paperless/export
      - /home/<user>/png-vault/consume:/usr/src/paperless/consume
    env_file: docker-compose.env
    environment:
      PAPERLESS_REDIS: redis://broker:6379
      PAPERLESS_DBHOST: db
      PAPERLESS_TIKA_ENABLED: 1
      PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000
      PAPERLESS_TIKA_ENDPOINT: http://tika:9998

  gotenberg:
    image: thecodingmachine/gotenberg
    restart: unless-stopped
    environment:
      DISABLE_GOOGLE_CHROME: 1

  tika:
    image: apache/tika
    restart: unless-stopped

volumes:
  data:
  media:
  pgdata:
fawqsir commented 2 years ago

I have a very similar docker-compose file. When I upload a pdf I get error 500 in the web ui. The docker log shows the error below even with redis properly connected

File "/usr/local/lib/python3.9/site-packages/redis/connection.py", line 563, in connect raise ConnectionError(self._error_message(e))

redis.exceptions.ConnectionError: Error 99 connecting to localhost:6379. Cannot assign requested address.

BennyBread commented 1 year ago

I've got exactly the same problem as @fawqsir. Is there anything which solves this problem?