From a7b431e7435aeacd084c0e3d59d8d035b6a667b6 Mon Sep 17 00:00:00 2001 From: Blake Mizerany Date: Wed, 10 Apr 2024 16:24:37 -0700 Subject: [PATCH] server: provide helpful workaround hint when stalling on pull (#3584) This is a quick fix to help users who are stuck on the "pull" step at 99%. In the near future we're introducing a new registry client that should/will hopefully be smarter. In the meantime, this should unblock the users hitting issue #1736. --- server/download.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/download.go b/server/download.go index db9b9681..935af9c1 100644 --- a/server/download.go +++ b/server/download.go @@ -247,7 +247,8 @@ func (b *blobDownload) downloadChunk(ctx context.Context, requestURL *url.URL, w } if !part.lastUpdated.IsZero() && time.Since(part.lastUpdated) > 5*time.Second { - slog.Info(fmt.Sprintf("%s part %d stalled; retrying", b.Digest[7:19], part.N)) + const msg = "%s part %d stalled; retrying. If this persists, press ctrl-c to exit, then 'ollama pull' to find a faster connection." + slog.Info(fmt.Sprintf(msg, b.Digest[7:19], part.N)) // reset last updated part.lastUpdated = time.Time{} return errPartStalled