XX-net/XX-Net · error
x_server error:no quota
Error message
x_server error:no quota
What it means
The x-tunnel server sent an error-report packet (pack_type 3) with error_code 1, meaning the account has no remaining quota/traffic. The client stops the whole session (self.stop()) and the roundtrip task returns.
Source
Thrown at code/default/x_tunnel/local/proxy_session.py:989
try:
content = decrypt_data(content)
payload = base_container.ReadBuffer(content)
magic, version, pack_type = struct.unpack("<cBB", payload.get(3))
if magic != b"P" or version != g.protocol_version or pack_type not in [2, 3]:
xlog.warn("get data head:%s", utils.str2hex(content[:2]))
data_info["stat"] = "timeout"
time.sleep(sleep_time)
continue
if pack_type == 3: # error report
error_code, message_len = struct.unpack("<BH", payload.get(3))
message = payload.get(message_len)
# xlog.warn("report code:%d, msg:%s", error_code, message)
if error_code == 1:
# no quota
xlog.warn("x_server error:no quota")
self.stop()
return
elif error_code == 2:
# unpack error
xlog.warn("roundtrip time:%f transfer_no:%d send:%d recv:%d unpack_error:%s",
roundtrip_time, transfer_no, send_data_len, len(content), message)
data_info["stat"] = "timeout"
continue
elif error_code == 3:
# session not exist
if self.session_id == request_session_id:
xlog.warn("server session_id:%s not exist, reset session.", request_session_id)
self.reset()
return
else:
xlog.error("unknown error code:%d, message:%s", error_code, message)
time.sleep(sleep_time)
continueView on GitHub (pinned to cfa5bc17b6)
Solutions
- Check account balance/traffic via the dashboard or request_balance API
- Top up or switch account, then restart the tunnel
- If quota was recently purchased, wait for server sync or contact provider
- Verify you're not sharing one account across too many clients
Defensive patterns
Strategy: fallback
Validate before calling
ok, info = session.call_api('/api/balance')
if ok and info.get('data', {}).get('balance', 0) <= 0:
# avoid starting traffic that will be cut off
pass Prevention
- Monitor balance/quota before heavy transfers
- Handle session stop callbacks to notify the user of quota exhaustion
- Keep a second account configured for failover
When it happens
Trigger: Any roundtrip response containing error_code==1: account traffic exhausted, plan expired, or server-side quota miscounting.
Common situations: Free quota used up, subscription expired mid-session, or billing sync delay on the server.
Related errors
- no quota
- login_session time:%d fail, res:%d msg:%s
- update_quota_loop timeout fail.
- XTunnelNotRunning
- ConnectionPipe remove sock e:%r
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/a38015baea7098bf.
Report an issue: GitHub.