Settle latency spike
Symptom:x402_settle_duration_seconds p95 > 15s.
Diagnose:
x402_rpc_latency_secondson your primary RPC. Elevated?x402_rpc_fallback_used_totalincrementing?- Stellar network status page.
- If primary RPC is slow, force failover by removing it from the list and restarting.
- If the whole network is slow, there is no fix. Surface
settlement_slowwarnings to sellers and let them decide whether to keep serving 402s.
Sponsor account low balance
Symptom: Alert onx402_sponsor_balance_xlm < SPONSOR_MIN_BALANCE_XLM.
Fix:
- Top up from treasury. Confirm settlement of the top-up before doing anything else.
- If balance dropped faster than expected, check
x402_sponsor_fees_paid_xlm_totalslope over the last hour. If the burn rate 2x’d, look for an abusive caller inx402_verify_totalby source.
Verify success rate collapse
Symptom:x402_verify_total{code="ok"} / x402_verify_total drops below 90%.
Diagnose:
- Which code is dominant? Group the counter by
code.
signature_invalidspike → client SDK regression. Contact upstream integrators.authorization_expiredspike → clock skew on the facilitator host.ntpq -p.insufficient_fundsspike → buyer-side. Not your incident.asset_not_supportedspike → someone deployed a client pointed at wrong facilitator.
RPC provider down
Symptom:x402_rpc_up{url=<primary>}=0.
Fix: Fallback should have taken over. Confirm x402_rpc_fallback_used_total incremented and x402_rpc_up{url=<fallback>}=1. If not:
- Add another fallback URL to config.
- Restart with new config.
- Only then debug the primary.
Bazaar index lag
Symptom:x402_bazaar_index_lag_seconds > 60s.
Diagnose:
- Storage backend health (Postgres CPU, WAL replication).
- Index worker logs for errors.
Key rotation
When: Scheduled (quarterly minimum), or on any suspected key compromise. Procedure:- Generate new keypair.
- Fund the new sponsor account with a small amount (~5 XLM) as smoke test.
- Deploy config with new
SPONSOR_SECRET_KEY. Confirm sponsorship works with a test transaction. - Full-fund the new account from treasury.
- Drain the old sponsor account back to treasury, leaving
SPONSOR_MIN_BALANCE_XLMas buffer for any in-flight tx. - After 24 hours with zero traffic on the old account, close it (merge account operation).