Error: Head "...": EOF when running Ollama commands

Hi

I’ve successfully deployed an Ollama app on Fly io. However, when I try to interact with Ollama through fly machine run -e OLLAMA_HOST=(…).flycast" --shell ollama/ollama and try running any ollama command, such as ollama list, ollama ps or ollama pull llama3.1:8b I got the following error: Error: Head “https://(…).flycast:443/”: EOF. The ollama --help command seems to be the only one that works.

Some previous discussions about this error stated that this may be due to low-disk space. But the initial size of my mount is 70gb, which I believe is plenty to pull an 8b ollama model or simply run the ollama list command.

Here is the fly.toml of my app:

app = '(...)'
primary_region = 'ord'
vm.size = 'a100-40gb'

[build]
  image = "ollama/ollama:latest"

[[mounts]]
  source = "models"
  destination = "/root/.ollama"
  initial_size = "70gb"

[http_service]
  internal_port = 11434
  force_https = false
  auto_stop_machines = true
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

Would really appreciate some help.

From App not working to Questions / Help

Hi Tomas,

I’d recommend running fly logs on a second terminal so you can see whether the application throws any errors when you try to hit a URL in it.

Let us know what you find - if it’s not clear, we can help take a look.

  • Daniel

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.