summaryrefslogtreecommitdiff
path: root/doc/example.env
diff options
context:
space:
mode:
authornoirscape <neko@catgirlsin.space>2022-02-12 22:16:13 +0100
committerShyam Sunder <sgsunder1@gmail.com>2022-02-14 17:33:23 -0500
commit82541536afd95ebbbb72b1983caae77b67eb8b2d (patch)
tree5bc18a029ef052797992342000bf1cfe61935ec3 /doc/example.env
parent6de0a742570058365753266d6b8f43b354de9b11 (diff)
Make waitress thread count configurable.
This should fix most scaling problems without needing to start more server instances. By default, waitress maintains at most 4 threads. This works fine if the database is small (sub 100k posts) but causes a large Task queue depth to occur if the database is larger. Letting users increase the amount of threads means that one server instance is able to handle more requests without locking up the rest of the site. This adds a new environment variable to .env, THREADS, which can be used to configure the amount of threads to start and is by default set to 4 (the default amount used by waitress).
Diffstat (limited to 'doc/example.env')
-rw-r--r--doc/example.env6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/example.env b/doc/example.env
index 59e1e85..303a25e 100644
--- a/doc/example.env
+++ b/doc/example.env
@@ -10,6 +10,12 @@ BUILD_INFO=latest
# otherwise the port specified here will be publicly accessible
PORT=8080
+# How many waitress threads to start
+# 4 is the default amount of threads. If you experience performance
+# degradation with a large number of posts, increasing this may
+# improve performance, since waitress is most likely clogging up with Tasks.
+THREADS=4
+
# URL base to run szurubooru under
# See "Additional Features" section in INSTALL.md
BASE_URL=/