From f6639c2f823850367583604a55c628a1ff3829cf Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Tue, 22 Sep 2026 16:12:01 +0200 Subject: [PATCH] Run Borg-UI with a single gunicorn worker --- ct/borg-ui.sh | 8 ++++++++ install/borg-ui-install.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ct/borg-ui.sh b/ct/borg-ui.sh index bba6b7c8d..06c332f4d 100644 --- a/ct/borg-ui.sh +++ b/ct/borg-ui.sh @@ -32,6 +32,14 @@ function update_script() { exit fi + if grep -q -- '--workers 2' /etc/systemd/system/borg-ui.service 2>/dev/null; then + msg_info "Reducing Service to a single worker" + sed -i 's/--workers 2/--workers 1/' /etc/systemd/system/borg-ui.service + systemctl daemon-reload + systemctl try-restart borg-ui + msg_ok "Reduced Service to a single worker" + fi + if check_for_gh_release "borg-ui" "karanhudia/borg-ui"; then msg_info "Stopping Service" systemctl stop borg-ui diff --git a/install/borg-ui-install.sh b/install/borg-ui-install.sh index ce4b01ca5..7756f618a 100644 --- a/install/borg-ui-install.sh +++ b/install/borg-ui-install.sh @@ -111,7 +111,7 @@ Type=simple User=root WorkingDirectory=/opt/borg-ui EnvironmentFile=/opt/borg-ui/.env -ExecStart=/opt/borg-ui/.venv/bin/gunicorn app.main:app --bind 0.0.0.0:8081 --workers 2 --worker-class uvicorn.workers.UvicornWorker --timeout 300 +ExecStart=/opt/borg-ui/.venv/bin/gunicorn app.main:app --bind 0.0.0.0:8081 --workers 1 --worker-class uvicorn.workers.UvicornWorker --timeout 300 Restart=on-failure RestartSec=5