[PR #2156] [CLOSED] Dynamic uWSGI Configuration Optimization Based on System Resources #1903

Closed
opened 2026-03-02 02:25:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amidaware/tacticalrmm/pull/2156
Author: @Lordkaly
Created: 2/25/2025
Status: Closed

Base: developHead: develop


📝 Commits (5)

  • 58bc8e1 Dynamic uWSGI Configuration Optimization Based on System Resources
  • c877509 Merge pull request #1 from Lordkaly/Lordkaly-Dynamic-uWSGI-1-1
  • b64b2ed Merge branch 'develop' into develop
  • 4a89d23 Add Redis cache configuration to local_settings.py in install.sh
  • 1bb3bd5 Merge pull request #2 from Lordkaly/Lordkaly-Redis-cache-1

📊 Changes

2 files changed (+120 additions, -80 deletions)

View changed files

📝 api/tacticalrmm/core/management/commands/create_uwsgi_conf.py (+69 -44)
📝 install.sh (+51 -36)

📄 Description

###Overview
This pull request enhances the uWSGI configuration generated by tacticalrmm/management/commands/create_uwsgi_conf.py by dynamically adjusting key parameters (workers, threads, cheaper, socket-timeout, and harakiri) based on the system's CPU count and available RAM. The changes improve scalability and performance, particularly under high agent loads, while maintaining compatibility with smaller systems.

###Motivation
In a production environment with 10 CPUs and 16 GB of RAM, running Tactical RMM with many active agents (like 2.000), I encountered frequent connect() failed (11: Resource temporarily unavailable) errors from NGINX due to uWSGI socket saturation. The original static configuration struggled to handle the load, leading to dropped connections and degraded performance. Through extensive testing, I identified optimized settings that resolved these issues.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amidaware/tacticalrmm/pull/2156 **Author:** [@Lordkaly](https://github.com/Lordkaly) **Created:** 2/25/2025 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `develop` --- ### 📝 Commits (5) - [`58bc8e1`](https://github.com/amidaware/tacticalrmm/commit/58bc8e182519b06f9bc59589976fc4d10ea25ab4) Dynamic uWSGI Configuration Optimization Based on System Resources - [`c877509`](https://github.com/amidaware/tacticalrmm/commit/c8775092e743d4db3a530614ce4f270b6b633179) Merge pull request #1 from Lordkaly/Lordkaly-Dynamic-uWSGI-1-1 - [`b64b2ed`](https://github.com/amidaware/tacticalrmm/commit/b64b2edf48d80b4cddbbd43c72cf09e48ed70442) Merge branch 'develop' into develop - [`4a89d23`](https://github.com/amidaware/tacticalrmm/commit/4a89d2362ecafc36b72e5d4fba235b03efdca418) Add Redis cache configuration to local_settings.py in install.sh - [`1bb3bd5`](https://github.com/amidaware/tacticalrmm/commit/1bb3bd5cbb0474e74af8841c1571f40047e5f94f) Merge pull request #2 from Lordkaly/Lordkaly-Redis-cache-1 ### 📊 Changes **2 files changed** (+120 additions, -80 deletions) <details> <summary>View changed files</summary> 📝 `api/tacticalrmm/core/management/commands/create_uwsgi_conf.py` (+69 -44) 📝 `install.sh` (+51 -36) </details> ### 📄 Description ###Overview This pull request enhances the uWSGI configuration generated by tacticalrmm/management/commands/create_uwsgi_conf.py by dynamically adjusting key parameters (workers, threads, cheaper, socket-timeout, and harakiri) based on the system's CPU count and available RAM. The changes improve scalability and performance, particularly under high agent loads, while maintaining compatibility with smaller systems. ###Motivation In a production environment with 10 CPUs and 16 GB of RAM, running Tactical RMM with many active agents (like 2.000), I encountered frequent connect() failed (11: Resource temporarily unavailable) errors from NGINX due to uWSGI socket saturation. The original static configuration struggled to handle the load, leading to dropped connections and degraded performance. Through extensive testing, I identified optimized settings that resolved these issues. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 02:25:14 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#1903
No description provided.