82541536af
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).
27 lines
828 B
Bash
27 lines
828 B
Bash
# Database credentials
|
|
POSTGRES_USER=szuru
|
|
POSTGRES_PASSWORD=changeme
|
|
|
|
# This shows up on the homescreen, indicating build information
|
|
BUILD_INFO=latest
|
|
|
|
# Port to expose HTTP service
|
|
# Set to 127.0.0.1:8080 if you wish to reverse-proxy the docker's port,
|
|
# 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=/
|
|
|
|
# Directory to store image data
|
|
MOUNT_DATA=/var/local/szurubooru/data
|
|
|
|
# Directory to store database files
|
|
MOUNT_SQL=/var/local/szurubooru/sql
|