mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-24 11:59:56 +00:00
scripts: increase relay pool and queue size
This commit is contained in:
@@ -12,3 +12,7 @@ CHAT_REF=88df79d1e26921c7d1835fc8484fade596356fb6
|
||||
|
||||
# GHC runtime options, without the +RTS/-RTS markers.
|
||||
#RELAY_RTS_OPTS="-N -F1.2 -A16m -I0.01 -Iw15"
|
||||
|
||||
# Database connection pool and internal queue size.
|
||||
#RELAY_POOL_SIZE=4
|
||||
#RELAY_QUEUE_SIZE=65536
|
||||
|
||||
@@ -14,7 +14,10 @@ services:
|
||||
environment:
|
||||
RELAY_NAME: ${RELAY_NAME}
|
||||
RELAY_WEB_DOMAIN: ${RELAY_WEB_DOMAIN}
|
||||
RELAY_RTS_OPTS: ${RELAY_RTS_OPTS:-} # empty: entrypoint default
|
||||
# Empty values fall back to the entrypoint defaults.
|
||||
RELAY_RTS_OPTS: ${RELAY_RTS_OPTS:-}
|
||||
RELAY_POOL_SIZE: ${RELAY_POOL_SIZE:-}
|
||||
RELAY_QUEUE_SIZE: ${RELAY_QUEUE_SIZE:-}
|
||||
# Password is passed as PGPASSWORD to keep it out of argv.
|
||||
DB_CONN: postgresql://${POSTGRES_USER}@db:5432/${POSTGRES_DB}
|
||||
PGPASSWORD: ${POSTGRES_PASSWORD}
|
||||
|
||||
@@ -14,6 +14,8 @@ WEB_ROOT = "/var/www/relay-web-channels"
|
||||
ADDR_FILE = "/out/relay-address.txt"
|
||||
CAPTURE_TIMEOUT = 180 # seconds
|
||||
DEFAULT_RTS_OPTS = "-N -F1.2 -A16m -I0.01 -Iw15"
|
||||
DEFAULT_POOL_SIZE = "4" # the binary defaults to a single connection
|
||||
DEFAULT_QUEUE_SIZE = "65536"
|
||||
|
||||
|
||||
def require(name):
|
||||
@@ -88,6 +90,8 @@ def main():
|
||||
"--relay-web-interval", "30",
|
||||
"-d", conn,
|
||||
"--create-schema",
|
||||
"--pool-size", os.environ.get("RELAY_POOL_SIZE") or DEFAULT_POOL_SIZE,
|
||||
"--queue-size", os.environ.get("RELAY_QUEUE_SIZE") or DEFAULT_QUEUE_SIZE,
|
||||
] + rts_args()
|
||||
os.execvp(relay[0], relay)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user