[GH-ISSUE #5403] [Bug]: Server becomes completely unresponsive after adding users in latest 3x-ui version #3778

Closed
opened 2026-10-31 20:34:54 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @maralnet20-sudo on GitHub (Jun 17, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5403

Describe the bug

Hello,

After upgrading 3x-ui to the latest version, I encountered a serious problem.

When I install the latest version of 3x-ui on a clean server without any users, the panel works normally.

But after adding users/clients, the whole server becomes completely unresponsive.

The issue is not only related to the 3x-ui web panel. Even the server terminal/SSH becomes unavailable, and I cannot run any commands anymore.

The only way to recover the server is to rebuild it from the hosting provider control panel.

I checked the server logs and resource usage from my hosting provider panel. After users are added, all server resources become fully occupied, and the server can no longer process anything.

My first server specs were:

CPU: 1 Core
RAM: 2 GB

I also upgraded the server resources, but the problem still remained and was not fixed.

So it seems that in the latest version, when users/clients are added, 3x-ui or xray may cause extremely high resource usage, which leads to the whole server freezing/crashing.

Steps to reproduce:

  1. Install the latest version of 3x-ui
  2. Run the panel on a server
  3. Add users/clients
  4. Wait until users start connecting
  5. The server becomes completely unresponsive
  6. SSH/terminal stops working
  7. The server must be rebuilt from the hosting provider panel

Expected behavior:

The panel should handle users normally and should not make the whole server unavailable.

Actual behavior:

After adding users, CPU/RAM usage becomes extremely high and the entire server goes down or freezes.

Please investigate this issue because it can make production servers completely unusable after upgrading to the latest version.

Thank you.

How to reproduce the problem

3x-ui version:
OS: Ubuntu / Debian
CPU:
RAM:
Number of users/clients:
Xray version:
Installation method: official script / manual

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.3.1

Xray-core version

No response

How did you install 3x-ui?

install.sh script

Operating system

ubuntu 22

Which parts of the panel are affected?

No response

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

None

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @maralnet20-sudo on GitHub (Jun 17, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5403 ### Describe the bug Hello, After upgrading 3x-ui to the latest version, I encountered a serious problem. When I install the latest version of 3x-ui on a clean server without any users, the panel works normally. But after adding users/clients, the whole server becomes completely unresponsive. The issue is not only related to the 3x-ui web panel. Even the server terminal/SSH becomes unavailable, and I cannot run any commands anymore. The only way to recover the server is to rebuild it from the hosting provider control panel. I checked the server logs and resource usage from my hosting provider panel. After users are added, all server resources become fully occupied, and the server can no longer process anything. My first server specs were: CPU: 1 Core RAM: 2 GB I also upgraded the server resources, but the problem still remained and was not fixed. So it seems that in the latest version, when users/clients are added, 3x-ui or xray may cause extremely high resource usage, which leads to the whole server freezing/crashing. Steps to reproduce: 1. Install the latest version of 3x-ui 2. Run the panel on a server 3. Add users/clients 4. Wait until users start connecting 5. The server becomes completely unresponsive 6. SSH/terminal stops working 7. The server must be rebuilt from the hosting provider panel Expected behavior: The panel should handle users normally and should not make the whole server unavailable. Actual behavior: After adding users, CPU/RAM usage becomes extremely high and the entire server goes down or freezes. Please investigate this issue because it can make production servers completely unusable after upgrading to the latest version. Thank you. ### How to reproduce the problem 3x-ui version: OS: Ubuntu / Debian CPU: RAM: Number of users/clients: Xray version: Installation method: official script / manual ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.3.1 ### Xray-core version _No response_ ### How did you install 3x-ui? install.sh script ### Operating system ubuntu 22 ### Which parts of the panel are affected? _No response_ ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? None ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:34:54 +07:00
Author
Owner

@github-actions[bot] commented on GitHub (Jun 17, 2026):

The report describes a complete resource-exhaustion event (CPU + RAM fully consumed, SSH unreachable, server must be rebuilt) that occurs after real clients begin connecting — not merely after adding the configuration entries. That pattern points toward the Xray child process rather than the panel itself as the primary resource consumer, but diagnosing it requires the information listed below, none of which is present in the current report.

What is needed to investigate further

  1. Panel + Xray version — run x-ui on the server and choose option 7 ("Check current panel information"), or run:

    x-ui version
    

    The form says 3.3.1 but the Xray-core version field is blank. This is critical: many resource-usage regressions are in the Xray binary, not the panel.

  2. OOM-killer evidence — after rebuilding, reproduce the issue, then from the provider console or serial console run:

    dmesg | grep -iE "oom|killed|out of memory"
    

    If the kernel OOM-killed a process you will see a line naming it (e.g. Killed process … (xray) or … (x-ui)). This immediately narrows scope to one component.

  3. Panel service logs — immediately after the freeze (or from the provider rescue console):

    journalctl -u x-ui -n 300 --no-pager
    
  4. Inbound protocol and transport — which protocol (VLESS / VMess / Shadowsocks / etc.) and stream transport (REALITY, WebSocket, gRPC, XHTTP, mKCP, etc.) the added inbounds use. Memory usage per connection varies enormously between transports; mKCP in particular maintains large in-memory send/receive buffers per connection.

  5. Approximate number of simultaneous connected clients at the time the server froze.

  6. Whether IP limit (LimitIP) is set on any client — the CheckClientIpJob (runs every 10 s) reads and parses the Xray access log on disk when IP-limiting is active with an older Xray binary that lacks the online-stats gRPC API. On a server receiving many connections, an unbounded access log file read every 10 seconds can spike memory usage. Confirmed in internal/web/job/check_client_ip_job.go.

  7. Whether Xray access logging is enabled — check the Xray template config in the panel settings (Xray Configs → Log section). If access log path is set to a file (not none), and the server is under high connection load, the log file can grow large before the hourly rotation runs.

Why this is unlikely to be a panel-only bug

The panel's most frequent background jobs run at @every 1s (Xray health check), @every 5s (traffic stats collection), and @every 10s (IP scan). For a single-panel deployment without remote nodes — the only case described here — the node heartbeat and node traffic-sync jobs exit immediately after loading zero nodes from the database (confirmed in internal/web/job/node_heartbeat_job.go:42 and internal/web/job/node_traffic_sync_job.go:77). A complete server freeze on a 2 GB / 1-core machine under real client load is most consistent with either Xray exceeding available RAM (causing kernel OOM thrashing or an OOM kill of the xray process that the panel then repeatedly restarts), a disk-full condition from an unbounded log file, or a bug in the specific Xray binary version that only manifests under connection load.

Please provide the items above — especially the Xray version and the dmesg OOM output — so this can be routed to the correct component.

This reply was generated automatically; a maintainer may follow up.

<!-- gh-comment-id:4727046801 --> @github-actions[bot] commented on GitHub (Jun 17, 2026): The report describes a complete resource-exhaustion event (CPU + RAM fully consumed, SSH unreachable, server must be rebuilt) that occurs after real clients begin connecting — not merely after adding the configuration entries. That pattern points toward the **Xray child process** rather than the panel itself as the primary resource consumer, but diagnosing it requires the information listed below, none of which is present in the current report. **What is needed to investigate further** 1. **Panel + Xray version** — run `x-ui` on the server and choose option 7 ("Check current panel information"), or run: ```bash x-ui version ``` The form says 3.3.1 but the Xray-core version field is blank. This is critical: many resource-usage regressions are in the Xray binary, not the panel. 2. **OOM-killer evidence** — after rebuilding, reproduce the issue, then from the provider console or serial console run: ```bash dmesg | grep -iE "oom|killed|out of memory" ``` If the kernel OOM-killed a process you will see a line naming it (e.g. `Killed process … (xray)` or `… (x-ui)`). This immediately narrows scope to one component. 3. **Panel service logs** — immediately after the freeze (or from the provider rescue console): ```bash journalctl -u x-ui -n 300 --no-pager ``` 4. **Inbound protocol and transport** — which protocol (VLESS / VMess / Shadowsocks / etc.) and stream transport (REALITY, WebSocket, gRPC, XHTTP, mKCP, etc.) the added inbounds use. Memory usage per connection varies enormously between transports; mKCP in particular maintains large in-memory send/receive buffers per connection. 5. **Approximate number of simultaneous connected clients** at the time the server froze. 6. **Whether IP limit (`LimitIP`) is set on any client** — the `CheckClientIpJob` (runs every 10 s) reads and parses the Xray access log on disk when IP-limiting is active with an older Xray binary that lacks the online-stats gRPC API. On a server receiving many connections, an unbounded access log file read every 10 seconds can spike memory usage. Confirmed in `internal/web/job/check_client_ip_job.go`. 7. **Whether Xray access logging is enabled** — check the Xray template config in the panel settings (Xray Configs → Log section). If access log path is set to a file (not `none`), and the server is under high connection load, the log file can grow large before the hourly rotation runs. **Why this is unlikely to be a panel-only bug** The panel's most frequent background jobs run at `@every 1s` (Xray health check), `@every 5s` (traffic stats collection), and `@every 10s` (IP scan). For a single-panel deployment without remote nodes — the only case described here — the node heartbeat and node traffic-sync jobs exit immediately after loading zero nodes from the database (confirmed in `internal/web/job/node_heartbeat_job.go:42` and `internal/web/job/node_traffic_sync_job.go:77`). A complete server freeze on a 2 GB / 1-core machine under real client load is most consistent with either Xray exceeding available RAM (causing kernel OOM thrashing or an OOM kill of the xray process that the panel then repeatedly restarts), a disk-full condition from an unbounded log file, or a bug in the specific Xray binary version that only manifests under connection load. Please provide the items above — especially the Xray version and the `dmesg` OOM output — so this can be routed to the correct component. *This reply was generated automatically; a maintainer may follow up.*
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
MHSanaei/3x-ui#3778
No description provided.