[GH-ISSUE #9300] Ollama Model download problem (Restarting) on windows #52578

Closed
opened 2026-04-28 23:45:39 -05:00 by GiteaMirror · 8 comments
Owner

Originally created by @SudoMds on GitHub (Feb 23, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9300

What is the issue?

Hi , I have exprienced an issue with downloading models in windows 11, download restarts and sometimes starts over, seen some scripts that retry downloads, here the correct code and how you can run it:

while ($true) {
    Write-Host "Attempting to download Llama 3.3 model..."
    $process = Start-Process -FilePath "ollama" -ArgumentList "pull llama3.3" -PassThru -NoNewWindow
    try {
        # Wait for the process to complete and check if it finishes successfully
        $process | Wait-Process -Timeout 300 -ErrorAction Stop  # Increased timeout to 5 minutes (300 seconds)
        
        if ($process.ExitCode -eq 0) {
            Write-Host "Model downloaded successfully!"
            break  # Exit the loop if the download was successful
        } else {
            Write-Host "Download failed (Exit code: $($process.ExitCode)). Retrying..."
        }
    } catch {
        Write-Host "Timeout occurred, restarting download..."
        $process | Stop-Process -Force -ErrorAction SilentlyContinue  # Forcefully stop the process if it times out
    }
    Start-Sleep -Seconds 5  # Wait 5 seconds before retrying
}

its a guide for download llama, you can change model name yourself
Guide:
Save it in Drive for Example "C:" with name "llama.ps1"
Open PowerShell as Administrator:

Right-click the Start menu and choose Windows PowerShell (Admin) or search for it.
Check the current execution policy by running the following command:

Get-ExecutionPolicy

If it returns Restricted or RemoteSigned, you need to change it.

To allow script execution, run this command:

Set-ExecutionPolicy RemoteSigned

You can also use Unrestricted if you prefer, but RemoteSigned is usually safer. When prompted, choose Y (Yes) to confirm.

because in our case file placed in Drive C:\ then we enter

cd C:\

then run the ps1 file by our powershell

.\llama.ps1

Download will start and retry only if we it see a timeout and not start over

Relevant log output

PS C:> .\llama.ps1
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 61% ▕██████████████████████████████████ ▏ 26 GB/ 42 GB 4.7 MB/s 58m10sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 64% ▕███████████████████████████████████ ▏ 27 GB/ 42 GB 4.2 MB/s 1h0mTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 66% ▕█████████████████████████████████████ ▏ 28 GB/ 42 GB 1.2 MB/s 3h16m


OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @SudoMds on GitHub (Feb 23, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9300 ### What is the issue? Hi , I have exprienced an issue with downloading models in windows 11, download restarts and sometimes starts over, seen some scripts that retry downloads, here the correct code and how you can run it: ``` while ($true) { Write-Host "Attempting to download Llama 3.3 model..." $process = Start-Process -FilePath "ollama" -ArgumentList "pull llama3.3" -PassThru -NoNewWindow try { # Wait for the process to complete and check if it finishes successfully $process | Wait-Process -Timeout 300 -ErrorAction Stop # Increased timeout to 5 minutes (300 seconds) if ($process.ExitCode -eq 0) { Write-Host "Model downloaded successfully!" break # Exit the loop if the download was successful } else { Write-Host "Download failed (Exit code: $($process.ExitCode)). Retrying..." } } catch { Write-Host "Timeout occurred, restarting download..." $process | Stop-Process -Force -ErrorAction SilentlyContinue # Forcefully stop the process if it times out } Start-Sleep -Seconds 5 # Wait 5 seconds before retrying } ``` its a guide for download llama, you can change model name yourself Guide: Save it in Drive for Example "C:\" with name "llama.ps1" Open PowerShell as Administrator: Right-click the Start menu and choose Windows PowerShell (Admin) or search for it. Check the current execution policy by running the following command: `Get-ExecutionPolicy` If it returns Restricted or RemoteSigned, you need to change it. To allow script execution, run this command: `Set-ExecutionPolicy RemoteSigned` You can also use Unrestricted if you prefer, but RemoteSigned is usually safer. When prompted, choose Y (Yes) to confirm. because in our case file placed in Drive C:\ then we enter `cd C:\` then run the ps1 file by our powershell `.\llama.ps1` Download will start and retry only if we it see a timeout and not start over ### Relevant log output PS C:\> .\llama.ps1 Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 61% ▕██████████████████████████████████ ▏ 26 GB/ 42 GB 4.7 MB/s 58m10sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 64% ▕███████████████████████████████████ ▏ 27 GB/ 42 GB 4.2 MB/s 1h0mTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 66% ▕█████████████████████████████████████ ▏ 28 GB/ 42 GB 1.2 MB/s 3h16m ```shell ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-04-28 23:45:39 -05:00
Author
Owner

@SudoMds commented on GitHub (Feb 23, 2025):

i hope it help you

<!-- gh-comment-id:2676964196 --> @SudoMds commented on GitHub (Feb 23, 2025): i hope it help you
Author
Owner

@rick-github commented on GitHub (Feb 23, 2025):

What version of ollama are you using? There have been updates that should mitigate this issue.

<!-- gh-comment-id:2676964629 --> @rick-github commented on GitHub (Feb 23, 2025): What version of ollama are you using? There have been updates that should mitigate this issue.
Author
Owner

@SudoMds commented on GitHub (Feb 23, 2025):

What version of ollama are you using? There have been updates that should mitigate this issue.

ollama -v
ollama version is 0.5.11

<!-- gh-comment-id:2676965156 --> @SudoMds commented on GitHub (Feb 23, 2025): > What version of ollama are you using? There have been updates that should mitigate this issue. ollama -v ollama version is 0.5.11
Author
Owner

@rick-github commented on GitHub (Feb 23, 2025):

The script is waiting 5 minutes for the download to complete. llama3.3 is 42GB, the internet connection has to be able to do 140MB/s (>1Gbps) in order to satisfy this. If the users connection is not at least that fast, this script will just make it take longer to download llama3.3 or other large model.

<!-- gh-comment-id:2676968484 --> @rick-github commented on GitHub (Feb 23, 2025): The script is waiting 5 minutes for the download to complete. llama3.3 is 42GB, the internet connection has to be able to do 140MB/s (>1Gbps) in order to satisfy this. If the users connection is not at least that fast, this script will just make it take longer to download llama3.3 or other large model.
Author
Owner

@SudoMds commented on GitHub (Feb 23, 2025):

i tested and works well

<!-- gh-comment-id:2676969200 --> @SudoMds commented on GitHub (Feb 23, 2025): i tested and works well
Author
Owner

@SudoMds commented on GitHub (Feb 23, 2025):

problem is when we let the download to complete by himself , after 30 min for example it restarts and start over, at least it restart download each 5 minutes and continue that download untill complete, i download llama 5 times , each time it goes to 30 - 36G and start again

<!-- gh-comment-id:2676970474 --> @SudoMds commented on GitHub (Feb 23, 2025): problem is when we let the download to complete by himself , after 30 min for example it restarts and start over, at least it restart download each 5 minutes and continue that download untill complete, i download llama 5 times , each time it goes to 30 - 36G and start again
Author
Owner

@SudoMds commented on GitHub (Feb 23, 2025):

.\llama.ps1
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 61% ▕██████████████████████████████████ ▏ 26 GB/ 42 GB 4.7 MB/s 58m10sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 64% ▕███████████████████████████████████ ▏ 27 GB/ 42 GB 4.2 MB/s 1h0mTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 66% ▕█████████████████████████████████████ ▏ 28 GB/ 42 GB 1.1 MB/s 3h39mTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 69% ▕████████████████████████████████████████████████████████████ ▏ 29 GB/ 42 GB 3.6 MB/s 1h1mTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 72% ▕███████████████████████████████████████████████████████████████ ▏ 30 GB/ 42 GB 4.1 MB/s 48m33sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling manifest
pulling manifest
pulling 4824460d29f2... 75% ▕██████████████████████████████████████████████████████████████████████ ▏ 31 GB/ 42 GB 4.5 MB/s 40m26sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 77% ▕█████████████████████████████████████████████████████████████████████████ ▏ 32 GB/ 42 GB 4.0 MB/s 40m44sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 79% ▕███████████████████████████████████████████████████████████████████████████ ▏ 33 GB/ 42 GB 1.9 MB/s 1h18mTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 81% ▕█████████████████████████████████████████████████████████████████████████████ ▏ 34 GB/ 42 GB 3.4 MB/s 38m50sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 83% ▕██████████████████████████████████████████████████████████████████████████████ ▏ 35 GB/ 42 GB 1.0 MB/s 2h1mTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 84% ▕█████████████████████████████████████████████���█████████████████████████████████ ▏ 35 GB/ 42 GB 2.2 MB/s 51m13sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 87% ▕██████████████████████████████████████████████████████████████████████████████████ ▏ 36 GB/ 42 GB 4.5 MB/s 21m23sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 88% ▕███████████████████████████████████████████████████████████████████████████████████ ▏ 37 GB/ 42 GB 1.4 MB/s 59m55sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 90% ▕█████████████████████████████████████████████████████████████████████████████████████ ▏ 38 GB/ 42 GB 2.0 MB/s 35m20sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 91% ▕██████████████████████████████████████████████████████████████████████████████████████ ▏ 38 GB/ 42 GB 1.7 MB/s 36m14sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 92% ▕███████████████████████████████████████████████████████████████████████████████████████ ▏ 39 GB/ 42 GB 1.6 MB/s 35m10sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 93% ▕████████████████████████████████████████████████████████████████████████████████████████ ▏ 39 GB/ 42 GB 1.7 MB/s 27m24sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 94% ▕█████████████████████████████████████████████████████████████████████████████████████████ ▏ 40 GB/ 42 GB 1.8 MB/s 22m18sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 97% ▕███████████████████████████████████████████████████████████████████████████████████████████ ▏ 41 GB/ 42 GB 4.6 MB/s 4m57sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████████ ▏ 42 GB/ 42 GB 4.2 MB/s 14sTimeout occurred, restarting download...
Attempting to download Llama 3.3 model...
pulling manifest
pulling 4824460d29f2... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 42 GB
pulling 948af2743fc7... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 1.5 KB
pulling bc371a43ce90... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 7.6 KB
pulling 53a87df39647... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 5.6 KB
pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 96 B
pulling c7091aa45e9b... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 562 B

=====
after 5 days trying , done i can download it

<!-- gh-comment-id:2677002344 --> @SudoMds commented on GitHub (Feb 23, 2025): .\llama.ps1 Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 61% ▕██████████████████████████████████ ▏ 26 GB/ 42 GB 4.7 MB/s 58m10sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 64% ▕███████████████████████████████████ ▏ 27 GB/ 42 GB 4.2 MB/s 1h0mTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 66% ▕█████████████████████████████████████ ▏ 28 GB/ 42 GB 1.1 MB/s 3h39mTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 69% ▕████████████████████████████████████████████████████████████ ▏ 29 GB/ 42 GB 3.6 MB/s 1h1mTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 72% ▕███████████████████████████████████████████████████████████████ ▏ 30 GB/ 42 GB 4.1 MB/s 48m33sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling manifest pulling manifest pulling 4824460d29f2... 75% ▕██████████████████████████████████████████████████████████████████████ ▏ 31 GB/ 42 GB 4.5 MB/s 40m26sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 77% ▕█████████████████████████████████████████████████████████████████████████ ▏ 32 GB/ 42 GB 4.0 MB/s 40m44sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 79% ▕███████████████████████████████████████████████████████████████████████████ ▏ 33 GB/ 42 GB 1.9 MB/s 1h18mTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 81% ▕█████████████████████████████████████████████████████████████████████████████ ▏ 34 GB/ 42 GB 3.4 MB/s 38m50sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 83% ▕██████████████████████████████████████████████████████████████████████████████ ▏ 35 GB/ 42 GB 1.0 MB/s 2h1mTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 84% ▕█████████████████████████████████████████████���█████████████████████████████████ ▏ 35 GB/ 42 GB 2.2 MB/s 51m13sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 87% ▕██████████████████████████████████████████████████████████████████████████████████ ▏ 36 GB/ 42 GB 4.5 MB/s 21m23sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 88% ▕███████████████████████████████████████████████████████████████████████████████████ ▏ 37 GB/ 42 GB 1.4 MB/s 59m55sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 90% ▕█████████████████████████████████████████████████████████████████████████████████████ ▏ 38 GB/ 42 GB 2.0 MB/s 35m20sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 91% ▕██████████████████████████████████████████████████████████████████████████████████████ ▏ 38 GB/ 42 GB 1.7 MB/s 36m14sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 92% ▕███████████████████████████████████████████████████████████████████████████████████████ ▏ 39 GB/ 42 GB 1.6 MB/s 35m10sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 93% ▕████████████████████████████████████████████████████████████████████████████████████████ ▏ 39 GB/ 42 GB 1.7 MB/s 27m24sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 94% ▕█████████████████████████████████████████████████████████████████████████████████████████ ▏ 40 GB/ 42 GB 1.8 MB/s 22m18sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 97% ▕███████████████████████████████████████████████████████████████████████████████████████████ ▏ 41 GB/ 42 GB 4.6 MB/s 4m57sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 100% ▕██████████████████████████████████████████████████████████████████████████████████████████████ ▏ 42 GB/ 42 GB 4.2 MB/s 14sTimeout occurred, restarting download... Attempting to download Llama 3.3 model... pulling manifest pulling 4824460d29f2... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 42 GB pulling 948af2743fc7... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 1.5 KB pulling bc371a43ce90... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 7.6 KB pulling 53a87df39647... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 5.6 KB pulling 56bb8bd477a5... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 96 B pulling c7091aa45e9b... 100% ▕███████████████████████████████████████████████████████████████████████████████████████████████▏ 562 B ===== after 5 days trying , done i can download it
Author
Owner

@rick-github commented on GitHub (Mar 4, 2025):

The download stalls should be mitigated as of 0.5.8 by #8831 and #9294 provides an overhaul of model pulling, so closing but feel free to add updates if you are still having issues.

<!-- gh-comment-id:2698061867 --> @rick-github commented on GitHub (Mar 4, 2025): The download stalls should be mitigated as of 0.5.8 by #8831 and #9294 provides an overhaul of model pulling, so closing but feel free to add updates if you are still having issues.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52578