Commit Graph

68 Commits

Author SHA1 Message Date
0bd0454ea7 server: organize error types (#9465)
Co-authored-by: Bruce MacDonald <brucewmacdonald@gmail.com>
2025-03-28 11:50:22 -07:00
291def6adb server: increase timeout in stall detection from 5s to 30s (#8831)
In some cases, downloads slow due to disk i/o or other factors,
causing the download to restart a part. This causes the download
to "reverse" in percent completion. By increasing the timeout to 30s,
this should happen less frequently.
2025-02-05 10:00:26 -08:00
c852b8e021 server: always print upload/download part info (#8832) 2025-02-04 19:30:49 -08:00
d8932c55e7 server: fix out of bounds exception on model download (#8746) 2025-02-04 18:52:47 -08:00
6fc9d22707 server: fix blob download when receiving a 200 response (#6656) 2024-09-05 10:48:26 -07:00
8e1050f366 server: reduce max connections used in download (#6347)
The previous value of 64 was WAY too high and unnecessary. It reached
diminishing returns and blew past it. This is a more reasonable number
for _most_ normal cases. For users on cloud servers with excellent
network quality, this will keep screaming for them, without hitting our
CDN limits. For users with relatively poor network quality, this will
keep them from saturating their network and causing other issues.
2024-08-13 16:47:35 -07:00
9b53e39d8e Merge pull request #6258 from coolljt0725/fix_typo
server/download.go: Fix a typo in log
2024-08-09 17:19:48 -07:00
2fa1db4345 Don't hard fail on sparse setup error
It seems this can fail in some casees, but proceed
with the download anyway.
2024-08-09 12:16:19 -07:00
7b61eba471 server/download.go: Fix a typo in log
Signed-off-by: Jitang Lei <leijitang@outlook.com>
2024-08-08 20:28:01 +08:00
fc85f50a2b Ensure sparse files on windows during download
The file.Truncate call on windows will write the whole file
unless you set the sparse flag, leading to heavy I/O at the
beginning of download.  This should improve our
I/O behavior on windows and put less stress on the users disk.
2024-08-06 10:58:08 -07:00
b732beba6a lint 2024-08-01 17:06:06 -07:00
dc77bbcfa4 server: fix json marshalling of downloadBlobPart (#6108) 2024-07-31 16:01:24 -07:00
750c1c55f7 server: fix race conditions during download (#5994)
This fixes various data races scattered throughout the download/pull
client where the client was accessing the download state concurrently.

This commit is mostly a hot-fix and will be replaced by a new client one
day soon.

Also, remove the unnecessary opts argument from downloadChunk.
2024-07-26 14:24:24 -07:00
c8af3c2d96 server: reuse original download URL for images (#5962)
This changes the registry client to reuse the original download URL
it gets on the first redirect response for all subsequent requests,
preventing thundering herd issues when hot new LLMs are released.
2024-07-25 15:58:30 -07:00
de5beb06b3 server: skip blob verification for already verified blobs 2024-06-05 16:39:11 -07:00
8ffb51749f nolintlint 2024-06-04 11:13:30 -07:00
db2ffa79f1 Fix download retry issue 2024-05-24 20:30:42 +02:00
ac145f75ca return on part done 2024-05-14 13:04:30 -07:00
a7b431e743 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.
2024-04-10 16:24:37 -07:00
1b272d5bcd change github.com/jmorganca/ollama to github.com/ollama/ollama (#3347) 2024-03-26 13:04:17 -07:00
fc06205971 Revert "adjust download and upload concurrency based on available bandwidth" (#2995) 2024-03-07 18:10:16 -08:00
084d846621 refactor 2024-02-21 13:42:48 -08:00
6a4b994433 lint 2024-02-21 13:42:48 -08:00
074934be03 adjust group limit based on download speed 2024-02-21 13:42:48 -08:00
0de12368a0 add new LimitGroup for dynamic concurrency 2024-02-21 13:42:48 -08:00
917bd61084 refactor download run 2024-02-21 13:42:46 -08:00
e43648afe5 rerefactor 2024-02-15 05:56:45 +00:00
f397e0e988 Move hub auth out to new package 2024-02-15 05:56:45 +00:00
9d3dcfd0ec fix logging 2024-01-26 11:04:27 -08:00
6e0ea5ecc8 Merge pull request #1916 from ollama/mxyng/inactivity-monitor
download: add inactivity monitor
2024-01-26 10:56:00 -08:00
fedd705aea Mechanical switch from log to slog
A few obvious levels were adjusted, but generally everything mapped to "info" level.
2024-01-18 14:12:57 -08:00
27331ae3a8 download: add inactivity monitor
if a download part is inactive for some time, restart it
2024-01-12 15:23:15 -08:00
2bb2bdd5d4 fix lint 2024-01-09 09:36:58 -08:00
acfc376efd add .golangci.yaml 2024-01-09 09:36:58 -08:00
ac5076ce1e exponential backoff up to 30s 2023-11-19 14:32:19 -05:00
cb42589792 adjust download/upload parts 2023-11-19 14:32:19 -05:00
e1d7056496 update progress statuses 2023-11-19 09:21:13 -05:00
d6ecaa2cbf update progress responses 2023-11-17 10:06:19 -08:00
cc54a416c6 Resume chunk download on UnexpectedEOF errors
If the chunk download is interrupted, resume from where we left off
2023-11-10 08:29:42 -08:00
434a6f9d46 return last error 2023-11-03 16:49:51 -07:00
d39709260f download with retry 2023-11-02 13:16:11 -07:00
60bb3c03a1 use http.Method 2023-11-02 13:12:45 -07:00
4e09aab8b9 concurrent uploads 2023-10-27 17:07:33 -07:00
910816a532 fix(download): no retry when out of space 2023-10-26 11:34:07 -07:00
257ffeb997 fix download 2023-10-12 12:52:43 -07:00
c413a55093 download: handle inner errors 2023-10-11 14:15:30 -07:00
630bb75d2a dynamically size download parts based on file size 2023-10-11 14:10:25 -07:00
a2055a1e93 update download 2023-10-11 14:10:25 -07:00
65dcd0ce35 always cleanup blob download (#747) 2023-10-10 13:12:29 -04:00
0560b28a8d names 2023-10-06 12:56:56 -07:00