DIM · Dagon Inference Marketplace

Seller troubleshooting

The gateway will not start

Symptom Likely cause Fix
Gateway startup failed; ... immediately Key file not a JSON array of 32 or 64 bytes; two keys identical; invalid route (endpoint path, nonce, schedule constants) Check against the configuration reference. Generate keys with solana-keygen new.
Same, after a pause rpcUrl did not answer getGenesisHash within rpcTimeoutMs Use a reachable RPC; raise rpcTimeoutMs if it is slow.
rolling gateway deployment requires Linux, a fixed port and a file ledger Linux with port: 0 or ledgerPath: ":memory:" Set a fixed port and a file ledger.
Startup refuses after a crash An interrupted request's route or schedule is no longer in the config Restore the old route, start, let recovery finalize it, then remove the route in a later deploy.
Startup fails with idlePollCpus set The list differs from the process CPU affinity Make them identical (for example systemd CPUAffinity=) or remove the field.

Buyers get 402

Code Cause on your side Fix
unknown_channel The channel is not in your channel view: it names a different settler, it was opened moments ago and has not reached your view yet, or your RPC/WebSocket is failing so snapshots expired (the view fails closed after channelCacheTtlMs). Check rpcUrl/wsEndpoint health. Buyers must open channels to the settler in your listing.
wrong_seller The channel names your settler but another payout account, or you changed payoutToken. Keep payoutToken stable; channels bind it at open.
route_mismatch You changed the endpoint, nonce or model identity (including max_concurrency), so the buyer's route ID no longer exists. Serve the old route alongside the new one until buyers refresh.
schedule_mismatch You changed the schedule, or effective_from is in the future, or the gateway clock is behind. Add a new route for new prices; fix the clock.
hold_expired The buyer sent the Hold after its dispatch_until, or your clock is ahead of the buyer's. Sync with NTP.
cap_too_low The buyer's cap is below your w_req_micros. Expected for small-cap agents; lower the minimum if you want them.
cap_exceeds_limit The cap exceeds the Mandate's per-request cap or the channel's remaining budget. Buyer-side.
insufficient_channel_funds Unvouchered receipts plus running requests use up the channel. Buyer-side: it should voucher or top up. Persistent cases mean a buyer is not vouchering.
duplicate_request, lane_replay A replayed Hold, or a Hold whose upload was abandoned. Buyer-side. Working as designed.
channel_closed The channel passed its service end or is closing. Buyer-side.
malformed_hold on every request Requests arrive without Hold headers, or your edge strips X-IM-* headers. Pass all request headers through the proxy.

Buyers get 429 or 503

  • 429 no_headroom — the route is at max_concurrency. Expected under load; if constant, you are under-provisioned or max_concurrency is lower than your engine can serve.
  • 503 ingress_busy — too many bodies uploading at once on the route or from one session. Usually slow clients; persistent cases suggest a client abusing uploads.
  • 503 gateway_draining — a deploy or maintenance is in progress. --control status shows which; --control resume ends maintenance.
  • 503 gateway_unavailable — the gateway is stopping or its ledger failed. Check disk space and the supervisor.

Requests are admitted but earn nothing

Receipt pattern Cause Fix
Streams end failed with backend_failed The upstream does not send a final usage chunk for streaming requests Use an engine or provider that honours stream_options.include_usage.
failed with backend_timeout First token later than ttft_max_ms, or the request exceeded timeoutMs Raise ttft_max_ms above your real p99 under load (new schedule, new route), or add capacity.
not_served with backend_rejected The upstream answered 4xx: its own rate limit, wrong backend.model, or a missing API key Align max_concurrency with the engine; check backend.model and apiKeyFile.
not_served with invalid_request Buyers send options your adapter rejects (common with the Anthropic adapter) Expected; it costs nothing.

Vouchers fail (HTTP 400)

Code Meaning
wrong_channel The voucher's channel, epoch or domain does not match a channel naming you.
bad_signature Not signed by the channel's session key.
over_budget settled_total exceeds the channel budget.
invalid_receipt A listed receipt was not issued by you on that channel, differs byte for byte, or was already acknowledged.
receipt_order Receipts are not in ascending (created_at, request_id) order.
wrong_delta The receipts do not sum to the voucher's increase, or the total went backwards.
wrong_commitment The commitment chain does not continue from your last acknowledgment.
channel_closed The channel is finalized or past its close deadline.

These are buyer-side errors, except invalid_receipt after you restored an old ledger backup: never roll a ledger back while channels are open.

Payouts are missing

  1. Is the voucher acknowledged? The buyer got {"ack": true}.
  2. Is the settler funded? solana balance on the settler address.
  3. Is the RPC healthy and history-enabled? Unavailable or pruned history defers settlement indefinitely.
  4. Has the channel's close deadline passed? Then the voucher is expired and can no longer be paid. Keep the gateway running through every channel's grace period.
  5. Is the payout account for the program's mint? The program checks it on every redemption (payouts).

The self-check fails

Use its per-check fix text; the common ones are covered in the self-check. "Listing is unreachable from this browser" is almost always CORS: use paste mode.