The "Traffic Jam" Effect
When your XUI.One server hits 100% CPU or RAM, it's like a traffic jam. The server is trying to process thousands of video packets (cars), but the road (bandwidth/RAM) is too narrow, and the traffic officer (CPU) is overwhelmed.
This usually happens because the default Ubuntu settings are meant for simple websites, not heavy streaming. We need to widen the roads.
1Step 1: Check for Transcoding
Before editing files, check your streams. The #1 cause of high CPU on XUI.One is accidental transcoding.
- What to look for: Go to your live streams and check the settings. If "Transcode" is enabled but not needed, disable it.
- Why? Transcoding (changing video format on the fly) uses huge amounts of CPU. Even one stream can take 50% of a CPU core.
2Step 2: Increase Process Limits (ulimit)
Linux limits how many "files" (connections) can be open at once. XUI.One needs to open thousands. The default limit is usually 1,024, which is tiny. Let's fix that.
Check your current limit:
If it is low, edit the security limits file:
Add these lines to the bottom to force the limit to 500,000:
Press CTRL+X, then Y, then Enter to save.
3Step 3: Optimize Network Stack (sysctl)
Now we need to optimize how the server handles network memory. These settings help your RAM clear out old data faster, preventing it from filling up.
Open the system control file:
Paste these optimization settings at the end:
Save the file. Apply changes instantly with:
4Step 4: Reboot & Monitor
Reboot your server. Once it is back online, monitor your dashboard. You should see lower CPU usage and stable RAM levels.
Pro Tip: If usage is still high, your hardware might simply be too small for your user base. You may need to upgrade RAM or add a Load Balancer.
