# Trace an Ollama 500 to the failing stage.

Revision 2 | 2026-10-17 | source_reported | pending_reproduction

SOURCE-BASED GUIDE. No installation or independent model benchmark performed.

An HTTP 500 identifies a server-side failure, not its cause. Locate the failing stage, inspect a sanitized error and relevant log lines, and repeat the same small request after one controlled change.

Reference: Ollama 0.40.5 · diagnostic plan

## Capture before changing anything

Record the app/runtime version, OS, exact endpoint, model name and digest, request options, failure timestamp and HTTP response. Keep a private original if needed; share only a minimal sanitized excerpt. A message mentioning a remote host needs its own endpoint investigation. Do not assume it came from a local model process.

## Separate transport from generation

First check the local model-list endpoint on the intended instance. Connection refused is a reachability or process issue, not an HTTP 500. A reachable list endpoint followed by a generation failure narrows the investigation but does not prove the cause. Preserve the generation error body before using a command option that suppresses it.

```sh
curl -i http://127.0.0.1:11434/api/tags
ollama --version
ollama list
```

## Find the right log

For a manual server, read the terminal that launched it. The official troubleshooting page lists macOS, Windows and Linux service log locations. On Linux a bounded service excerpt is often enough to identify the failing phase. On Windows open the Ollama log folder through the platform instructions. Inspect logs locally and remove prompts, paths and account details before sharing.

```sh
# Linux systemd test service only
journalctl -u ollama --since '10 minutes ago' --no-pager
```

## Follow the failure stage

Load/allocation failure: confirm model identity, free memory and context before a smaller, separately recorded attempt. Device initialization failure: inspect the actual backend and driver combination; do not reset a shared GPU. Failure only at longer inputs: save token length and context settings. Remote endpoint failure: check routing and local/cloud model selection. These are diagnostic branches, not reproduced fixes.

## Use a controlled retest

After one authorized change, repeat the original request with the same model digest and parameters. A later success with a different model proves only that different condition. If reducing context allows a short request to finish, preserve the original failure rather than announcing a universal repair. Record success, failure or not-run for every attempted branch.

## Avoid destructive shortcuts

Do not clear the model store, reinstall drivers, restart a shared machine or modify a container daemon merely because an error page lists those possibilities. First establish the failing component and preserve a rollback path. If more evidence is needed, package the version, digest, minimal public prompt, options, sanitized error and one relevant log excerpt for a maintainer.

## Rollback and close the incident

Restore the previous configuration and stop only the temporary process you started. Confirm that the prior working path still works. The downloadable incident template includes before/after conditions and unresolved questions. The interactive tool below never reads local logs, contacts a model server or changes your machine.

## Use failures as evidence about a configuration

The two-Spark source reports that a Qwen FP8-KV configuration could answer short inputs but failed on the first chunked input, while separate GLM attention backends failed before a forward pass. These are examples of different failure stages, not fixes for every HTTP 500. A useful incident record preserves the exact model, engine, input shape and error before changing one setting.

## Self-check (not site evidence)

- [ ] Local versus remote endpoint recorded
- [ ] Runtime and exact model digest captured
- [ ] Error body preserved and sanitized
- [ ] One variable changed at a time
- [ ] Original request repeated after change

## Sources

- [Ollama troubleshooting](https://docs.ollama.com/troubleshooting) | checked 2026-10-17
- [Ollama list models API](https://docs.ollama.com/api/tags) | checked 2026-10-17
- [Ollama generate API](https://docs.ollama.com/api/generate) | checked 2026-10-17
