xcode75 / XManagerPlus

An Xray Manager
https://xcode75.github.io/XMPlusDocs/
255 stars 47 forks source link

[BUG] High CPU usage on backend server despite minimal traffic: getting multiple servers online offline notifications #281

Closed amihos closed 10 months ago

amihos commented 10 months ago

Environment

OS: UBUNTU 22.10

PHP version: 7.4

DB version: 5.7.40

Panel Version: XMPlus 1.0 - v20230813

Debug Info: enable debug in config.php and upload screenshot.

Bug Info

I recently set up a new XMPlus backend server, version v2.1.4. The frontend version is 1.0 - v20230813. Even though there is minimal traffic to this backend server since it was just installed, I noticed the CPU usage reaching 100%. image

To troubleshoot, I checked the following:

XMPlus frontend version: 1.0 - v20230813 XMPlus backend version: v2.1.4 Debug reporting settings in config.yml file: Set to "none" Traffic to backend server: Almost none since recently installed Despite the minimal load, the CPU usage is spiking to 100%.

As a consequence of the high CPU usage, I am seeing intermittent server going offline/online notifications from the Telegram bot, occurring every 5-10 minutes. This aligns with the "ConnIdle" parameter I have set to 300 seconds in config.yml. image

َAlso when i restart backend server using xmplus restart the cpu usage comes to almost zero stays like this for 10 seconds and then again spikes back to 100%

I wanted to document this issue in case others experience similar problems. Some next steps to further debug could be:

Monitor CPU usage over time to see if any patterns emerge image

Check processes/services running on the server that could be culprits Verify config settings related to performance/resources Compare to other backend servers to see if issue is isolated Let me know if any other details would help diagnose the high CPU usage problem. I'm posting this here in the forums in hopes that others may have suggestions or ideas to troubleshoot.

bahramini commented 10 months ago

same problem for me. even after update frontend to v20230817 and all backends to last version. this problem exist on all servers with 1 vcpu, even without any online user. on servers with 2 vcpu when online users go above 50-60 notifications apear.

xcode75 commented 10 months ago

I am using same backend (xmplus) and no cpu issues, disable backend logs, if still have issue i will suggest use XrsyR backend

bahramini commented 10 months ago

@amihos did you find a solution for this? still have the problem with some nodes