Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Make Worker Timeout Configurable #1471

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,12 @@ PAPERLESS_THREADS_PER_WORKER=<num>
PAPERLESS_THREADS_PER_WORKER automatically.


PAPERLESS_WORKER_TIMEOUT=<num>
Machines with few cores or weak ones might not be able to finish OCR on
large documents within the default 1800 seconds. So extending this timeout
may prove to be useful on weak hardware setups.


PAPERLESS_TIME_ZONE=<timezone>
Set the time zone here.
See https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-TIME_ZONE
Expand Down
2 changes: 1 addition & 1 deletion src/paperless/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def default_task_workers():
'catch_up': False,
'recycle': 1,
'retry': 1800,
'timeout': 1800,
'timeout': int(os.getenv("PAPERLESS_WORKER_TIMEOUT", 1800)),
'workers': TASK_WORKERS,
'redis': os.getenv("PAPERLESS_REDIS", "redis://localhost:6379")
}
Expand Down