Troubleshooting
This page starts from the symptom. Each row says where to look first, which error or log line you will find, and which page has the fix. The error reference lists every error by status, and the log reference lists every operator log line.
A real-world scenario
A team says "our traces stopped showing up yesterday". The admin finds the row for an empty logging destination below, runs GET /callbacks/list, sees the callback is still active, then searches the gateway log for Spanway.LoggingError and finds Langfuse Layer Error with a 401 from Langfuse. The team had rotated its Langfuse keys the day before. She retypes the new secret key on the Logging & Alerts page and the traces return.
First checks
-
Find the request. Open Logs in the Admin UI, filter by Status = Failure and the time, and open the row. The drawer shows the Error Code and Message. If you have the
x-spanway-call-idfrom the response, paste it into the search box. -
Read the error. Look the status and message up in the error reference.
-
Read the gateway log around the same time. Look any line you do not recognise up in the log reference.
-
Check what is configured:
curl http://localhost:4000/active/callbacks \-H "Authorization: Bearer $SPANWAY_API_KEY"Expected result: a JSON object with
alerting, thespanway.success_callback,spanway.failure_callbackandspanway.callbackslists,num_callbacksandnum_alerting. A destination or alert channel missing here is not configured, whatever the config file says.
Requests
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
/, /openapi.json or /routes answers 404 although the gateway is up | The request's Authorization header, and the gateway log at INFO | Spanway API docs: answered 404 to GET /openapi.json because the caller is not a signed-in user. | API docs and build details and log reference. Send your own key or sign in to the Admin UI first. |
A public page such as /public/catalogue or /public/model_hub answers 429 | The Retry-After header, and the gateway log at WARNING | Spanway public route rate limit: answered 429 to GET /public/catalogue because one address sent more than 120 requests this minute. | Copy protection and log reference. Wait for the next minute, raise public_route_rate_limit_per_minute, or set trusted_proxy_ranges behind a load balancer. |
Every request answers 401 | The client's Authorization header and the Virtual Keys page | A key without the sk- prefix gets Spanway Virtual Key expected. The key is expected to start with 'sk-'. and one quiet WARNING line user_api_key_auth(): Exception occured per request. An sk- key the gateway does not know gets type token_not_found_in_db with Invalid proxy server token passed and an ERROR line instead | Error reference, 401. Send a virtual key, not a provider key. |
A key that worked yesterday answers 401 | The key's expiry on the Virtual Keys page | expired_key | Error reference, 401 and key expiry. |
403 for one model only | The key's and team's models list | auth_error with key_model_access_denied or team_model_access_denied | Error reference, 403. |
422 with budget_exceeded | The key, team or user budget on its page | Budget has been exceeded! ... | Error reference, 422 and budgets. |
429 under load | The x-spanway-rate-limited-by and rate_limit_type headers, then that scope's tpm_limit, rpm_limit or max_parallel_requests | Rate limit exceeded for <scope>: <id>. Limit type: ..., or Team borrow cap reached and Team share of the ... priority pool from the dynamic limiter | Error reference, 429 and rate limits. |
| Priority pools have no effect | The gateway log at the first request | PREMIUM FEATURE: Reserving tpm/rpm by priority is a premium feature | Log reference, rate limits. Add the licence. |
Every request answers 502 after adding a compression guardrail | The response body's detail.error and the guardrail's unreachable_fallback | Headroom compression service unreachable or another Headroom compression service ... message | Headroom errors. Fix Headroom, or set unreachable_fallback: fail_open. |
A guardrail you configured in config.yaml never runs | The gateway log at start | Skipping guardrail '<name>': invalid configuration, proxy is starting WITHOUT this guardrail | Log reference, guardrails. Fix the guardrail and restart. |
| A custom code guardrail lets everything through | The gateway log at WARNING | Custom code guardrail '<name>': Unknown action '<action>'. Treating as allow. | Custom code guardrails. Return one of the helpers. |
Requests fail with Generic Guardrail API failed | The gateway log at ERROR | Generic Guardrail API: failed to make request: <error> | Generic guardrail API. Fix the service. |
| A team's approved guardrail never checks its requests | The team's Guardrails on the Teams page | The guardrail is active but attached to nothing | Generic guardrail API, approve. Attach it to the team. |
| A Word file is refused by RAG ingest | The response detail.reason | unsupported_format or archive_not_allowed | RAG ingest, upload checks. Save it as PDF. |
Some requests answer 503 overloaded_error with Worker at capacity | GET /health/backlog and spanway_admission_rejected_requests_total by reason | The worker is full and its queue is full or timed out | Error reference, admission control. Retry after Retry-After, raise max_in_flight_requests_per_worker or add workers. |
| Admission control has no effect although the keys are set | The gateway log at ERROR | Ignoring invalid admission control settings, per-worker admission control is disabled | Log reference, admission control. Fix the value. |
Signing in to a worker from the control plane fails with Invalid or expired login code | The worker log at start | control_plane_url is configured but Redis is not configured ... | Control plane errors. Configure Redis on the worker. |
| Old request logs are still there although a retention period is set | The gateway log | Invalid maximum_spend_logs_retention_interval value or Spend log cleanup run finished: outcome=budget_exhausted | Log reference, retention. Fix the schedule or raise the run budget. |
Every request answers 503 while Redis is down | The response message | Rate limit enforcement unavailable: request counters could not be verified against Redis | Error reference, 503. Restore Redis, or set fail_closed_rate_limit_enforcement: false. |
| The Model Leaderboard shows nothing new for a minute | The gateway log at WARNING | Spend tracking - database out of connections or rollup row lock timed out during model usage flush | Log reference, spend rollups. Usage shows after the next flush. |
A Cloud signup answers 421, or the signup page says a region "has its own signup page" | The response detail.signup_url and the gateway log at INFO | cloud: signup for region <region> pointed at <signup_url>, nothing stored | Error reference, Cloud data regions. Sign up on that region's page. |
A budget change or delete answers 404 or 400 | The response message | Budget with id '<id>' not found, or Budget <id> is the budget of organization <org> | Error reference, budgets. |
| A model's requests cost 0 in spend | The spend log row's zero_cost_diagnostic and the gateway log at WARNING | Billable request has no price and is logged as unpriced | Log reference, pricing and custom pricing. |
403 model_cost_map_missing for a new model | The Cost Tracking page's block switch | Model '<model>' has no pricing in the cost map | Error reference, cost tracking. Add a price or turn the switch off. |
401 Not allowed to access model due to tags configuration | The deployments' Tags and Enable Tag Filtering | No deployment carries the request's tag | Error reference, tags and tag routing. |
| A free key reaches the premium deployment | The request's x-spanway-tags header and reject_clientside_metadata_tags | The caller sets its own tags | Tag routing, who can set tags. |
The encryption check answers 503 | The gateway log at WARNING | scan: <location> unavailable | Error reference, credentials. Fix the database and run the check again. |
A Copilot model answers Connect GitHub Copilot for credential ... | Your connections on the LLM Credentials tab | The user never connected | Personal provider connections. |
401 on POST /global/spend/reset with an admin key | The key used | which is only for MASTER KEY | Error reference, spend. Use the master key. |
The capture rate card answers 503 | The gateway environment | OPENAI_ADMIN_KEY is not set on the proxy | Spend capture rate. |
429 with No healthy deployment available | The deployments the error message names, Models + Endpoints, Health Status, and the spanway_deployment_cooled_down metric | Every deployment of the model is cooled down | Error reference, 429 and cooldowns. |
POST /fallback answers 400 ... is set in the config file and cannot be changed here. | router_settings.fallbacks in config.yaml | The file owns the list | Error reference, fallbacks. Edit the file. |
| A fallback list set through the API disappears after a restart | The gateway version and config.yaml | Older versions let the file overwrite an API change | Fallback management. Keep each list in one place. |
The readiness probe answers 503 with "db": "disconnected" | The database and allow_requests_on_db_unavailable | The pod is out of rotation until the database answers | Health checks and log reference, health. |
The Kubernetes preStop drain hook fails with 401 | drain_endpoint_token and the hook's X-Drain-Token header | No token is configured, or the values differ | Draining a worker. |
| Two teams get the same cached answer | The cache key and namespace | Exact-match entries are shared by every caller of the model group | Who shares an entry. |
A key gets 403 Not allowed to set ... as a cache control | The key's allowed_cache_controls | The control is not allowed for that key | Error reference, cache. |
A request with a data policy answers 400 ... satisfies the data policy | The deployments' declared data terms on Models + Endpoints | No deployment meets the policy | Error reference, data policies and log reference, data policy. |
500 on a management route | The gateway log for DB not connected | The route needs a database | Error reference, 500. Set DATABASE_URL. |
| Cost shows as empty or zero | The gateway log | Model=<name> not found in completion cost map | Log reference and custom pricing. |
The website assistant answers 503 | The body kind, and public_assistant lines in the gateway log | not_ready with no index swapped line yet, or unavailable with admission counters are unreachable or turn failed, answering unavailable: kind=... | Error reference, 503 and log reference, website assistant. Publish the index, or restore Redis. |
The website assistant answers 403 or 429 | The page's origin and the Retry-After header | forbidden_origin, or rate_limited for one visitor address | Error reference, 403 and 429. Add the origin to public_assistant_origins, or wait. |
429 from POST /v1/inspect | The Retry-After header | Inspect rate limit reached: <n> dry runs per minute for this key | Error reference, 429. Wait, or raise INSPECT_RPM_LIMIT. |
500 from POST /v1/inspect | The body's preset or inspect_as_key field | Routing presets need a connected database or Inspecting as another key needs a connected database | Error reference, 500. Set DATABASE_URL. |
400 No deployment of model '<model>' satisfies the provider preferences | The request's provider object, and the key's and team's preferences | Which rule removed the last deployment, named after the colon | Provider preferences errors. Loosen the preferences. |
404 No routing preset '@preset/<name>' | The preset name and the key's team on Routing Presets | The preset is missing in the key's team and the global scope | Routing presets errors. Create it or fix the name. |
422 StructuredOutputRepairError | The response format and the repair settings on Router Settings, Structured Output | The reply never matched the JSON schema within the allowed retries | Structured output repair errors. |
A provider answers 401 and the log shows Defaulting to os.environ value for key= | The secret manager and the identity the gateway uses | The lookup failed and the environment variable was empty | Secret managers. Fix the secret or the access. |
| A cleared Router Settings value still applies | The audit row for router_settings and the gateway start time | The saved value is gone, the running gateway keeps its value until it restarts | Router Settings. Restart the gateway. |
| A policy in audit mode blocks nothing but no verdicts show in Logs | The gateway log at WARNING | Pipeline: guardrail '<name>' not found in callbacks | Log reference, policies. Create the guardrail or remove it from the policy. |
A replay or dry run counts guardrails as errored | The gateway log at ERROR | Pipeline: unexpected error from guardrail '<name>': ... | Log reference, policies. Check the guardrail's provider and credentials. |
422 from POST /policies/simulate | The msg of the detail entry | Value error, set exactly one of policy_name, policy_id or guardrails | Error reference, 422. Send one policy field and one scope field. |
| A leaked key report was accepted but no audit row shows | Whether audit logging is on, then the gateway log | A compromised key report: blocked virtual key ... reporter_ip=... WARNING line and no row, because audit logging is off | Leaked keys. Turn on store_audit_logs to keep the block as an audit row. |
Every request answers 451 with sanctioned_jurisdiction or sanctions_location_unknown | The response code, the readiness check's sanctions_geofence and the gateway log at WARNING | sanctions geofence refused <path> from <network> ... | Error reference, sanctions and log reference |
Every request answers 503 sanctions_policy_unreadable | The gateway log at ERROR | sanctions geofence: the jurisdiction policy is unreadable | Error reference, sanctions |
| Enterprise features stopped working without a restart | GET /health/license and the gateway log at WARNING | "license_type": "starter" and License validity changed: valid=false | Error reference, license |
The Lens page answers 503 naming a setting | The gateway environment | LENS_GATEWAY_SECRET, SPANWAY_LENS_URL or SPANWAY_LENS_SERVICE_TOKEN missing or too short | Error reference, Lens |
| Lens traces have no inputs or outputs | The gateway log at WARNING | Lens content policy not sent, Lens keeps no span content | Log reference, Lens |
A CI eval run answers 403 or 429 | The response message | this ci key cannot run dataset ... or this ci key already has <n> runs in progress | Error reference, evals |
| A scheduled eval stopped firing | The gateway log at WARNING | evals: schedule <id> disabled, <reason> | Log reference, evals |
Sign-in, SSO and SCIM
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
People get 401 right after signing in at the identity provider | ALLOWED_EMAIL_DOMAINS and ui_access_mode on the SSO Settings tab | The email domain is not allowed, or the Admin UI is open to admins only | Error reference, SSO and Admin UI SSO. |
SAML sign-in answers 401 Could not process SAML response or 401 SAML authentication failed | The gateway log at WARNING | SAML response could not be processed: <reason> or SAML authentication failed: <reason>, often an expired answer, a wrong audience or clock skew | Log reference, sign-in. Fix the certificate, the clock or the audience the reason names. |
SAML sign-in answers 500 Invalid SAML configuration | The gateway log at ERROR | SAML settings could not be loaded: <reason> | Error reference, SSO. Fix the metadata URL or XML. |
Every SSO sign-in answers 403, existing users included | The response body | You must be a Spanway Enterprise user to use SSO for more than 5 users. | Error reference, 403. Add a license or deactivate users. |
403 User is not in the restricted SSO group | The person's groups at the identity provider | ui_access_mode is restricted_sso_group and the group is missing | Admin UI SSO. Add the person to the group. |
spanwayctl login fails with CLI login session not found or expired | The number of replicas and the cache section | Several replicas without a shared Redis cache, and the log line CLI SSO login session not found in cache | CLI sign-in. Configure Redis for every replica. |
spanwayctl login keeps printing Still waiting for authentication... | The browser tab the CLI opened | The browser step was not finished, or the code was not typed | CLI sign-in. Run spanwayctl login again and finish within ten minutes. |
An organization's sign-in link answers 404 This sign-in link is not available | The organization's SSO tab | The connection is off, deleted or not licensed | Error reference, SSO and organization SSO. |
Organization SSO sign-in answers 401 | The gateway log at WARNING | org sso: refused sign-in through <connection>: <reason>, for example an unverified domain or an account with a gateway role | Log reference, sign-in. Fix what the reason names. |
Organization SSO answers 429 Too many sign-in lookups | trusted_proxy_ranges | Every visitor shares the load balancer's address | Organization SSO. Set trusted_proxy_ranges. |
Every SCIM call answers 401 | The token on the SCIM tab | A wrong or revoked token, or a key without allowed_routes: ["/scim/*"] | SCIM errors. Create a new SCIM token. |
A person's keys answer 401 User=<id> has been deactivated via SCIM | The person's status in the directory | The directory deactivated or unassigned them | Error reference, SCIM. Reactivate them in the directory. |
A group push answers 400 User with ID '<id>' does not exist | scim_upsert_user and the token type | Strict mode is on, or an organization-scoped token named a member with no account | SCIM errors. Assign the user to the app first, or turn scim_upsert_user on. |
| SCIM users land in no team | The group ids the provider sends | The group id is not a Spanway team_id | SCIM errors. Create the group through SCIM first. |
| SCIM pushes grant no proxy admin | The gateway log at WARNING | Error reading scim_admin_group setting, defaulting to None | Log reference, SCIM. Check the config file and the database. |
| An Admin UI user cannot sign in after the move to the FIPS image | The gateway log | Sign-in refused: this password was stored with scrypt | Moving an existing gateway. Set the password again or use SSO. |
AI hub and public catalogue
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
Visitors get 401 on the AI hub | enable_public_model_hub on the UI Settings tab | The hub is closed to visitors without a key, the default | Error reference, AI hub. |
GET /public/catalogue answers 404 | Status Page, Public surfaces | Public catalogue is not enabled | Public catalogue. |
The catalogue shows null latency and error rate | The gateway log at ERROR | Error aggregating public catalogue traffic | Log reference, AI hub. |
| A deleted model still shows on the hub with no provider | public_model_groups | The name is still on the public list | AI hub, choosing what is public. |
MCP
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
| The model still gets the full tool catalogue | The key's and its team's Tool search switch | Neither has tool search on, or the request does not use the gateway as its MCP server | Tool search. Switch it on for the key or team. |
| Tool search returns nothing useful | The Tool Search tab of MCP Servers, and the gateway log | A high similarity threshold, a small top_k, or mcp_tool_search settings are invalid | Tool search errors and log reference, MCP. Lower the threshold or fix the setting. |
Saving tool search settings answers 500 | The response body | Set `'STORE_MODEL_IN_DB='True'` in your env to enable this feature. | Error reference, 500. Turn on store_model_in_db. |
An assistant cannot connect to /admin/mcp | The status code and body | 404, 401 A personal Spanway admin bearer credential is required., or 403 This Spanway identity may not use the admin connector. | Admin MCP HTTP errors. Turn the server on, send a key, or check SPANWAY_ADMIN_MCP_MIN_ROLE. |
| The gateway will not start after an admin MCP change | The startup output | SPANWAY_ENABLE_ADMIN_MCP must be true or false or another admin MCP setting message | Admin MCP startup errors. |
| An admin MCP call has no audit row | The gateway log | Hosted admin MCP audit row was not written | Log reference, MCP. Check the database. |
A tool call answers 403 with approval_required | The response body | approval_id and the names of the matching policies | Error reference, human approval. Wait for the approval, then retry with x-spanway-approval-id. |
A workflow step fails with approval_unavailable | The gateway log | approval gate for workflow step ... failed | Log reference, human approval. Check the database. |
A bring your own key tool answers 401 byok_auth_required | The response body | The user stored no personal key for the server | Error reference, MCP credentials. Connect from the server card. |
A request with an MCP tool answers 400 Violated guardrail policy | The response body | unregistered_servers names a server the gateway does not know | Error reference, MCP gateway. Register the server or remove the tool. |
An environment plan answers 409 | The response body | This is environment ..., a missing environment name or an unresolved secret | Error reference, environments. |
A skill upload or plugin change answers 400 skill_scan_blocked, skill_scan_incomplete or skill_scan_unsupported | The message and Skill scan results on the Skills page | The file that was blocked or could not be checked, and the guardrail | Skill scanning errors and log reference, skill scanning. |
A memory call answers 401 for a non admin key | The response body | Only proxy admin can be used ... | Error reference, memory. Memory is for proxy admins today. |
Client tools
Start here when a coding agent, an SDK, a chat app or an MCP client cannot use the gateway. The first question is whether the request reached the gateway at all, because the fix is on a different side in each case.
- Open Logs, filter by the tool's key alias and the time of the failure. If you have the
x-spanway-call-idfrom the answer, search for it instead. - A row is there. The request reached the gateway, so read the status and message in the drawer and look them up in the client error reference. The drawer also shows the deployment the router picked, which the
x-spanway-model-id,x-spanway-model-groupandx-spanway-routing-reasonresponse headers repeat on the client side. - No row is there. The request never arrived, so the problem is the base URL, the network or TLS on the client side, see connect any client.
- Still unclear. Start the gateway with
--detailed_debugon a test instance to log every request it receives with its route and the key check result, and turn on the client's own debug output from the table below, then compare the URL and headers the client sends with the base URL table.
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
A new tool fails with 404 on its first call | The client's debug output | A path with /v1/v1, or a path without /v1 the gateway does not serve | Apply the /v1 rule. |
An MCP client gets 401 although the key works in curl | The MCP configuration file | A literal $SPANWAY_API_KEY in a JSON file, which no client expands | Use the client's own variable syntax from MCP clients. |
| The tool works but its spend lands on the wrong team | Logs, the key column | Several tools share one key | Give each tool its own key, see make a key for a tool. |
Claude Code's /model picker misses a gateway model | spanwayctl configure claude output, or the listing curl in Claude Code models | /model will list <n> of the proxy's <m> models, or model discovery is off | Set CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1. Only a wildcard route, a name with *, never shows in the picker, so pin it with --model or add a named model for it. |
| Budget errors in the tool's own error popup | Virtual Keys, the key's spend | 422 budget_exceeded | Raise the budget or wait for the reset, see client error reference. |
| Requests are slow and the gateway shows several attempts | Logs, x-spanway-attempts | The SDK retried on top of the gateway's own retries | Set max_retries=0 in the SDK and let the gateway retry. |
| Client | Debug switch | Where the output goes |
|---|---|---|
| OpenAI Python and Node SDKs | OPENAI_LOG=debug in the environment | The terminal, with each request URL, status and retry. |
| Anthropic Python and TypeScript SDKs | ANTHROPIC_LOG=debug in the environment | The terminal, the same detail as above. |
| Google Gen AI SDK for Python | logging.basicConfig(level=logging.DEBUG) in the script | The terminal, through the httpx logger. |
| Claude Code | claude --debug, and /status inside a session | ~/.claude/debug/<session-id>.txt. /status shows the base URL and the credential source inside the session. |
| Codex | RUST_LOG=debug codex, and codex debug models for the model list it loaded | Under $CODEX_HOME/log, with a plain text codex-tui.log when log_dir is set, see Codex. |
| OpenCode | opencode --print-logs --log-level DEBUG | The terminal, and ~/.local/share/opencode/log. opencode debug paths prints the folder. |
| Gemini CLI | gemini --debug | The terminal. F12 opens the CLI's debug console. |
| GitHub Copilot CLI | copilot --log-level debug | ~/.copilot/logs/, one file per session. |
| Aider | aider --verbose | The terminal. |
| Goose | Always on | ~/.local/state/goose/logs/ on macOS and Linux. |
| VS Code MCP servers | MCP: List Servers, pick the server, Show Output | The Output panel for that server. |
| Gateway | spanway --config config.yaml --detailed_debug | The gateway log, with every request, the key check and the routing decision. Use it on a test instance, the volume is high. |
Logging destinations
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
| Nothing arrives at a destination | GET /callbacks/list | The callback is missing, so it is not configured, or present, so the destination rejects events | If missing, add it, see logging. If present, read the next row. |
| The callback is listed but the destination is empty | The gateway log for Spanway.LoggingError | Langfuse Layer Error, Langsmith Error: 401, or another traceback naming the destination | Log reference. Fix the credentials or host it names. |
Saving a callback answers 400 naming two fields | The Edit Callback Settings dialog | The host changed while the stored secret was kept | Retype the secret with the new host, see logging. |
| A team's traces land in the wrong project | The team's Settings tab | No team callback, so the gateway wide one is used | Team logging. |
Team callback answers 403 | The license | scoped_integrations is not licensed | Team logging. |
| Generations show no prompt or response | The request's team and the gateway settings | turn_off_message_logging or a zero data retention policy | What Spanway stores. |
/metrics answers 401 or 404 | The scraper's key and spanway_settings.callbacks | Unauthorized access to metrics endpoint, or the route is not mounted | Prometheus. |
| Spans print to the console instead of reaching the collector | OTEL_EXPORTER and OTEL_ENDPOINT | OpenTelemetry: Unknown log exporter, or no endpoint set | OpenTelemetry. |
Alerts and email
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
| No alert arrives in Slack | GET /health/services?service=slack | 422 "slack" not in proxy config, or success with nothing in the channel | Alerting. Add the destination, or fix SLACK_WEBHOOK_URL. |
| Webhook alerts never arrive while Slack works | The gateway log at startup | WEBHOOK_SIGNING_SECRET is invalid (...) | Log reference. Fix the secret. |
| An alert type you expect never fires | alert_types in the config and the Alerting Types tab | The type is off, or off by default | Alerting. |
| Budget alerts flood the on-call channel | alert_to_webhook_url | Every type goes to one webhook | Alerting. Point budget_alerts at another webhook. |
| No email arrives | GET /health/services?service=email and the gateway log | Failed to send email alert, RESEND_API_KEY is not set, or has no recipients | Email. |
| An email event cannot be switched off | The response to Save Changes | 400 ... email_settings set in the config file and cannot be changed here | Email. Change it in the config file. |
| A query on Query and Explore is refused or stops | The message under Run or the detail.code of POST /analytics/query | query_refused with the part that is not allowed, query_timeout, or busy | Error reference, Query and Explore. Use the tables in Tables you can query, narrow the dates, or retry. |
| End users on the Explore tab stays empty | Whether your application sends x-spanway-end-user-id and GET /analytics/users/active | total_users 0 although requests arrive | End user analytics. Send the header or the user field with each request. |
| Alerts Inbox stays empty while a key clearly spends far more than usual | The gateway log for Usage anomaly scan lines and GET /alerts/baselines?entity_type=key | No scan line (the scan is off with scan_minutes: 0), Usage anomaly scan failed, or the key's threshold above today's value because a past busy day set its usual level | Error reference, alerts inbox and log reference. Click Scan now, lower multiplier or baseline_days. |
| One deployment is slow or keeps answering 429 | Model Leaderboard, Live deployment speed, or GET /health/deployments | High p90 latency or time to first token, or a growing Rate limited (429) count | Deployment speed. Move traffic with routing or raise the provider limit. |
| A key owner never gets an expiry email | The gateway log for key hygiene: lines | expiry notices skipped, no email callback is configured, not emailed (the key has no owner), or failed: User email not found | Log reference, key security. Configure email, give the key an owner or the user an email address. |
Audit log and request logs
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
| The Audit Logs tab shows an Enterprise notice | The license | 403 naming a Spanway enterprise license | Audit logs. |
| No new audit rows appear | The gateway log | Failed Creating audit log or prisma_client is None | Log reference. |
| Verify chain reports a broken row | The row it names and your SIEM export | entry_hash_mismatch or previous_hash_mismatch | Audit logs. Treat the database as tampered with until explained. |
Verify chain says truncated_before | maximum_audit_log_retention_period | Retention deleted the start of the chain | Audit logs. Compare chain_anchor with your export. |
| The Logs page says Request/Response Data Not Available | store_prompts_in_spend_logs and the team's data policy | Prompt storage is off or the request was redacted | What Spanway stores. |
Open run ledger answers 404 or 403 | The id and the key's user | No run found for id or Not allowed to view run ledgers | Error reference and run ledger. |
An app's trace exporter logs 413, 501 or 503 from the gateway | The exporter's endpoint and the gateway log | The upload size, a missing Lens connection, or OTLP upload relay failed | App traces and provider attempts and the log reference. |
| A slow request does not show why it was slow | The Provider attempts card in the Logs drawer | One row per retry or fallback with its time and error | Provider attempts. |
A request on the Logs page shows [hidden by your role] | The notice above the request and the user's custom role | The role denies logs.prompts, logs.responses or logs.tool_arguments, or the gateway could not read the role and logged Could not read the custom role of <user id>, hiding log content | Data access governance. Use Reveal with logs.reveal, or change the role. |
Containers and migrations
| Symptom | Look at | What you will find | Fix |
|---|---|---|---|
docker exec ... sh or kubectl exec ... -- sh fails | The exec command | exec: "sh": executable file not found in $PATH, because the images have no shell | Image errors. Run spanwayctl or python directly. |
| The container exits at once with exit code 2 | docker logs or the pod log | usage: spanway-container <...> [args] | Image errors. Start the command with a role. |
| The migrations job fails | The job log | DATABASE_URL is not set ... or Migration job failed after retries. | Image errors and the log reference. |
The gateway will not start with SPANWAY_FIPS_MODE on | The startup output | Spanway proxy refused to start: SPANWAY_FIPS_MODE is on but ... | FIPS image errors. Run spanway-ai-fips and keep TLS certificate checks on. |
Related
- Error reference for every status and message.
- Log reference for every operator log line.
- Logs page to find a request.
- Logging & Alerts page to change destinations and alerts.
- Health for deployment health checks.