mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-21 23:54:22 +01:00
Adjust matrix postgres connection numbers
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
e9993d139c
commit
26e7c040f8
|
@ -23,18 +23,18 @@
|
|||
in
|
||||
pkgs.writeShellScript "mautrix-discord"
|
||||
''
|
||||
DATA_DIR="/var/lib/mautrix-discord"
|
||||
CONFIG_FILE="$DATA_DIR/config.yaml"
|
||||
REGISTRATION_FILE="/var/lib/registrations/mautrix-discord.yaml"
|
||||
DB_FILE="$DATA_DIR/sqlite.db"
|
||||
DATA_DIR="/var/lib/mautrix-discord"
|
||||
CONFIG_FILE="$DATA_DIR/config.yaml"
|
||||
REGISTRATION_FILE="/var/lib/registrations/mautrix-discord.yaml"
|
||||
DB_FILE="$DATA_DIR/sqlite.db"
|
||||
|
||||
${getExe pkgs.envsubst} < ${./mautrix-discord.yaml} > "$CONFIG_FILE"
|
||||
chmod 755 "$CONFIG_FILE"
|
||||
${getExe pkgs.envsubst} < ${./mautrix-discord.yaml} > "$CONFIG_FILE"
|
||||
chmod 755 "$CONFIG_FILE"
|
||||
|
||||
[ -e "$REGISTRATION_FILE" ] || \
|
||||
${getExe mautrix-discord} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -g
|
||||
${getExe mautrix-discord} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -n
|
||||
'';
|
||||
[ -e "$REGISTRATION_FILE" ] || \
|
||||
${getExe mautrix-discord} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -g
|
||||
${getExe mautrix-discord} -c "$CONFIG_FILE" -r "$REGISTRATION_FILE" -n
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -41,7 +41,7 @@ appservice:
|
|||
# To connect via Unix socket, use something like postgres:///dbname?host=/var/run/postgresql
|
||||
uri: postgres://mautrix-discord:${MAUTRIX_DISCORD_APPSERVICE_DATABASE_PASSWORD}@127.0.0.1/mautrix-discord?sslmode=disable
|
||||
# Maximum number of connections. Mostly relevant for Postgres.
|
||||
max_open_conns: 20
|
||||
max_open_conns: 10
|
||||
max_idle_conns: 2
|
||||
# Maximum connection idle time and lifetime before they're closed. Disabled if null.
|
||||
# Parsed with https://pkg.go.dev/time#ParseDuration
|
||||
|
|
|
@ -51,7 +51,7 @@ appservice:
|
|||
# For sqlite, min_size is used as the connection thread pool size and max_size is ignored.
|
||||
# Additionally, SQLite supports init_commands as an array of SQL queries to run on connect (e.g. to set PRAGMAs).
|
||||
database_opts:
|
||||
min_size: 1
|
||||
min_size: 2
|
||||
max_size: 10
|
||||
|
||||
# The unique ID of this appservice.
|
||||
|
|
|
@ -23,7 +23,7 @@ makeSystem {
|
|||
authentication = "host all all all md5";
|
||||
|
||||
config = {
|
||||
max_connections = 50;
|
||||
max_connections = 70;
|
||||
shared_buffers = "384MB";
|
||||
effective_cache_size = "1152MB";
|
||||
maintenance_work_mem = "96MB";
|
||||
|
@ -35,9 +35,9 @@ makeSystem {
|
|||
work_mem = "1966kB";
|
||||
min_wal_size = "1GB";
|
||||
max_wal_size = "4GB";
|
||||
max_worker_processes = 12;
|
||||
max_worker_processes = 24;
|
||||
max_parallel_workers_per_gather = 4;
|
||||
max_parallel_workers = 12;
|
||||
max_parallel_workers = 24;
|
||||
max_parallel_maintenance_workers = 4;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue