]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Tweaks gunicorn to preload the app and use shared memory for temporary fs 1500/head
authorTrenton Holmes <holmes.trenton@gmail.com>
Wed, 31 Aug 2022 17:59:55 +0000 (10:59 -0700)
committerTrenton Holmes <holmes.trenton@gmail.com>
Fri, 2 Sep 2022 01:04:12 +0000 (18:04 -0700)
gunicorn.conf.py

index daebd4bea33ff5de712e6f49d7115b176766b458..a3ada7a645b0fe2ad16415d5af5c7cb7baefad23 100644 (file)
@@ -1,9 +1,17 @@
 import os
 
+# See https://docs.gunicorn.org/en/stable/settings.html for
+# explanations of settings
+
 bind = f'{os.getenv("PAPERLESS_BIND_ADDR", "[::]")}:{os.getenv("PAPERLESS_PORT", 8000)}'
+
 workers = int(os.getenv("PAPERLESS_WEBSERVER_WORKERS", 1))
 worker_class = "paperless.workers.ConfigurableWorker"
 timeout = 120
+preload_app = True
+
+# https://docs.gunicorn.org/en/stable/faq.html#blocking-os-fchmod
+worker_tmp_dir = "/dev/shm"
 
 
 def pre_fork(server, worker):