MrDoc Deployment Guide
Quick Start
Docker Deployment
Docker Image Deployment
Docker Compose Deployment
Configure Guide
Configuration File Guide
Customizing uWSGI Configuration
Data Security
Site Data Backup / Site Migration
Data Export and Import
Open Source Edition → Professional Edition Data Migration
Troubleshooting
Server Requirements & Deployment Recommendations
Published with MrDoc Pro
-
+
home
Customizing uWSGI Configuration
MrDoc provides a default uWSGI configuration optimized for mid-range server setups. This configuration is generally suitable for servers with: * 4 to 8 GB of RAM (each worker process limited to 2 GB, after which it will automatically restart); * 4 CPU cores (worker process count limited to 4); * Moderate traffic load (maximum requests per worker set to 1000); If the default uWSGI config does not work well on your server, for example: * On entry-level devices, the CPU or memory usage is too high; * On mid-to-high performance servers with heavy traffic, the site response is unsatisfactory or system resources are underutilized; You can customize the uWSGI configuration file according to your hardware and performance needs. --- ### Steps to customize uWSGI config: 1. Inside the MrDoc project directory, create a new file named `uwsgi_custom.ini` under the `/config/` folder. 2. Copy the contents of the existing `/config/uwsgi.ini` file into your new `uwsgi_custom.ini`. Example default configuration: ```ini [uwsgi] master = true # Enable master process mode to manage worker processes processes = 4 # Spawn 4 worker processes (set according to CPU cores) chdir = /app/MrDoc # Set project root directory path wsgi-file= /app/MrDoc/MrDocPro/wsgi.py # Set WSGI application entry point pidfile = /app/MrDoc/config/uwsgi.pid # Path to store the process ID file http = 0.0.0.0:10086 # Enable HTTP server listening on all IPs at port 10086 logto = /app/MrDoc/log/uwsgi_log.log # Log file output path log-maxsize = 3000000 # Max log file size 3MB before rotation chmod-socket = 660 # Socket file permissions vacuum = true # Clean up environment (remove socket and pid files) on shutdown master = true # Duplicate setting, can be removed enable-threads = true # Enable thread support max-requests = 1000 # Restart worker after handling 1000 requests (prevents memory leaks) reload-on-as = 2048 # Restart worker if virtual memory usage exceeds 2048MB reload-on-rss = 2048 # Restart worker if physical memory usage exceeds 2048MB evil-reload-on-as = 2048 # Force restart ignoring active requests if virtual memory > 2048MB evil-reload-on-rss = 2048 # Force restart ignoring active requests if physical memory > 2048MB buffer-size = 65536 # Internal buffer size set to 64KB (for large requests) http-timeout = 300 # HTTP request timeout in seconds socket-timeout = 300 # Socket connection timeout in seconds reload-mercy = 1 # Grace period (seconds) for worker to finish active requests on restart worker-reload-mercy = 1 # Grace period for worker restart to complete ongoing requests ``` --- Each option includes comments explaining its purpose. You can adjust the parameters according to your server’s actual specifications and workload.
mrdoc
Nov. 18, 2025, 10:34 a.m.
Forward
Favorites
Last
Next
Scan the QR Code
Copy link
Scan the QR code to share.
Copy link
Markdown file
Word document
PDF document
PDF document (print)
share
link
type
password
Update password
Validity period