v2rayA/v2rayA · warning
the last request is being processed
Error message
the last request is being processed
What it means
processingErr is a package-level sentinel returned when a mutating connection/v2ray/latency request arrives while the single-flight `updating` flag is held by a previous request. The controller serializes these handlers with updatingMu; concurrent requests are rejected immediately instead of queueing. It is an intentional back-pressure signal, not a fault.
Source
Thrown at service/server/controller/controller.go:11
package controller
import (
"fmt"
"sync"
)
var (
updating bool
updatingMu sync.Mutex
processingErr = fmt.Errorf("the last request is being processed")
)
View on GitHub (pinned to 71e5442fc5)
Solutions
- Serialize requests client-side: wait for the in-flight response before sending another mutating request
- Add retry with backoff on this response and re-check state via GET touch endpoints
- Debounce UI buttons and disable them until the response arrives
Example fix
// before: parallel fire-and-forget
for i:=0;i<3;i++ { go post("/api/v2ray") } // two may hit processingErr
// after: sequential with retry
if err := post("/api/v2ray"); isProcessing(err) { time.Sleep(500*time.Millisecond); post("/api/v2ray") } Defensive patterns
Strategy: retry
Validate before calling
// client-side: track in-flight request
if inflight { await(inflightPromise) } // do not fire a second mutating call Try / catch
resp := post(path); if resp.Message == "the last request is being processed" { sleep(backoff); retry(maxAttempts=3) } Prevention
- Debounce/disable buttons while a request is in flight
- Serialize mutating calls through a single queue
- Treat this response as retryable back-pressure
When it happens
Trigger: Any of PostConnection, DeleteConnection, PostV2ray, DeleteV2ray, GetPingLatency, GetHttpLatency called while another of those handlers is still running (updating==true) — e.g. double-clicking connect, or parallel latency tests issued with a connect request.
Common situations: UI sending duplicate requests on rapid clicks; scripts polling connect while a restart is in flight; load balancer retrying a slow request that is still being processed.
Related errors
AI-assisted analysis of v2rayA/v2rayA@71e5442fc5 (2026-09-05).
Data as JSON: /api/errors/a920311321bec943.
Report an issue: GitHub.