ollama - 💡(How to fix) Fix Ollama is crashing on Ubuntu 25.10 for Claude Code tasks [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14757Fetched 2026-04-08 00:32:03
View on GitHub
Comments
3
Participants
3
Timeline
5
Reactions
0
Timeline (top)
commented ×3closed ×1labeled ×1

Code Example

OS details:

$ lsb_release -a                                 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 25.10
Release:        25.10
Codename:       questing



CPU

╰─$ cat /proc/cpuinfo|grep AMD |grep model|head -n1
model name      : AMD RYZEN AI MAX+ 395 w/ Radeon 8060S


Claude Code config:

export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://10.0.2.2:11434
export OLLAMA_MODEL=qwen3-coder-next
claude  --model qwen3-coder-next
RAW_BUFFERClick to expand / collapse

What is the issue?

When I run Claude Code using qwen3-coder-next on Ollama, I'm getting periodical crashes of Ollama servce(+ (core dumps). It's happening after some time of GPU load, may happen after 10 minutes or 1 hour of heavy load. I'm trying mostly coding tasks, e.g. adding Prometheus metrics into small golang web service.

ollama.log

Relevant log output

OS details:

$ lsb_release -a                                 
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 25.10
Release:        25.10
Codename:       questing



CPU

╰─$ cat /proc/cpuinfo|grep AMD |grep model|head -n1
model name      : AMD RYZEN AI MAX+ 395 w/ Radeon 8060S


Claude Code config:

export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://10.0.2.2:11434
export OLLAMA_MODEL=qwen3-coder-next
claude  --model qwen3-coder-next

OS

Linux

GPU

AMD

CPU

AMD

Ollama version

0.17.0

extent analysis

Fix Plan

The issue seems to be related to GPU overload causing Ollama service crashes. To fix this, we can try to reduce the GPU load by implementing the following steps:

  • Reduce GPU allocation: Try reducing the GPU allocation for the Ollama service to prevent overload.
  • Implement timeout and retry: Implement a timeout and retry mechanism to handle temporary GPU overload.
  • Monitor GPU usage: Monitor GPU usage to detect potential overload and take preventive measures.

Example Code

To reduce GPU allocation, you can try setting the CUDA_VISIBLE_DEVICES environment variable to limit the number of GPUs used by the Ollama service. For example:

import os

# Set CUDA_VISIBLE_DEVICES to limit GPU usage
os.environ["CUDA_VISIBLE_DEVICES"] = "0"  # Use only the first GPU

Alternatively, you can use the gpu_options parameter when creating the Ollama service to limit GPU memory allocation. For example:

import tensorflow as tf

# Create a TensorFlow session with limited GPU memory allocation
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.5)
sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))

Verification

To verify that the fix worked, you can monitor the GPU usage and Ollama service logs to check for any crashes or errors. You can use tools like nvidia-smi or gpu-monitor to monitor GPU usage.

Extra Tips

  • Make sure to update your Ollama service to the latest version to ensure you have the latest bug fixes and performance improvements.
  • Consider implementing a more robust monitoring and alerting system to detect potential issues before they cause crashes.
  • If you continue to experience issues, try reducing the GPU load further or exploring other optimization techniques, such as model pruning or quantization.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - 💡(How to fix) Fix Ollama is crashing on Ubuntu 25.10 for Claude Code tasks [3 comments, 3 participants]