diff --git a/.env.example b/.env.example index 74ba734f..8f80ed6c 100644 --- a/.env.example +++ b/.env.example @@ -33,7 +33,11 @@ ENABLE_SOFT_DELETE=false # If ENABLE_SOFT_DELETE is true, transactions deleted for more than KEEP_DELETED_TRANSACTIONS_FOR days will be truly deleted. Set to 0 to keep all. KEEP_DELETED_TRANSACTIONS_FOR=365 -TASK_WORKERS=1 # This only work if you're using the single container option. Increase to have more open queues via procrastinate, you probably don't need to increase this. +# Background tasks. One worker running one job at a time is enough for most instances. +# To run more jobs at once, raise PROCRASTINATE_WORKER_CONCURRENCY: jobs share the worker's memory. +PROCRASTINATE_WORKER_CONCURRENCY=1 +# Each extra task worker is a full copy of the app in memory (~140 MiB). Only works with the single container option. +TASK_WORKERS=1 # OIDC Configuration. Uncomment the lines below if you want to add OIDC login to your instance #OIDC_CLIENT_NAME="" diff --git a/README.md b/README.md index 66eed081..8644b8ef 100644 --- a/README.md +++ b/README.md @@ -191,7 +191,8 @@ To create the first user, open the container's console using Unraid's UI, by cli | SESSION_EXPIRY_TIME | int | 2678400 (31 days) | The age of session cookies, in seconds. E.g. how long you will stay logged in | | ENABLE_SOFT_DELETE | true\|false | false | Whether to enable transactions soft delete, if enabled, deleted transactions will remain in the database. Useful for imports and avoiding duplicate entries. | | KEEP_DELETED_TRANSACTIONS_FOR | int | 365 | Time in days to keep soft deleted transactions for. If 0, will keep all transactions indefinitely. Only works if ENABLE_SOFT_DELETE is true. | -| TASK_WORKERS | int | 1 | How many workers to have for async tasks. One should be enough for most use cases | +| TASK_WORKERS | int | 1 | How many worker processes to run for async tasks. Each one is a full copy of the app in memory, so prefer `PROCRASTINATE_WORKER_CONCURRENCY` for running more tasks at once. Only works with the single container option | +| PROCRASTINATE_WORKER_CONCURRENCY | int | 1 | How many tasks each task worker runs at the same time. Tasks share their worker's memory. One should be enough for most use cases | | WEB_CONCURRENCY | int | 1 | How many web worker processes to run. Each one is a full copy of the app in memory | | WEB_THREADS | int | 1 | How many threads each web worker runs. Threads share their worker's memory, so `WEB_CONCURRENCY=1` with `WEB_THREADS=4` serves more requests at once with less RAM than 2 workers | | IMPORT_TEMP_ROOT | string | /usr/src/app/temp | Where uploaded import files wait to be processed. Defaults to the `temp` folder inside the app folder. Must be writable and shared between the web and task processes. |