[GH-ISSUE #2094] Unable to push: 502 Bad Gateway #1199

Open
opened 2026-04-12 10:58:38 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @olafgeibig on GitHub (Jan 19, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2094

Originally assigned to: @mxyng on GitHub.

CLI:

Error: max retries exceeded: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>

Log excerpt:

2024/01/19 15:06:25 upload.go:268: 8b5770ff65e7 part 15 attempt 2 failed: http status 502 Bad Gateway: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
, retrying in 4s
2024/01/19 15:06:25 upload.go:268: 8b5770ff65e7 part 27 attempt 1 failed: Put "https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/repositories/olafgeibig/neuralbeagle14/_uploads/71ccdd2d-1df5-427c-a47e-0336116f6d36/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=66040c77ac1b787c3af820529859349a%2F20240119%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240119T140540Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&partNumber=28&uploadId=AD3DIyDomRmwHs4yel2vHgQoQv_q5TNC8C5kR8nIqa4F2ZvUSA5nedmmMGzj2Kbb2_Z9uVR7hGLLCBYhqA60HOmaQpQBwih3cDQrt6sEzV4xhSX9wR2lK9ufShFf_kUxapuJbrnt1WKBshhGO_dSLeZyMWnS8TXZEsKwg_nGBrDXUXWW9Wzx2bt4E0CLLpaJFcNaH7PeLiL1rNZYCUYjFT-KKtmCiwFwJAX9ACb_IyZQAEQcQYhWb3Roigy1ru2eQps624gxkuZscCNBCtqqaPYZmzatUD7moRyytzJXpTYqqv2uTEGinOD0uUXuHkT7vsRzwpefEfjHWr7faftIwS8&X-Amz-Signature=60121f8d44aff8e6e97c82531b6301f9b0ba595053da9fc17e7da44a3e794997": write tcp [2003:fc:d703:f400:dcdd:9b3:23c8:d35d]:51090->[2606:4700::6812:95a]:443: write: broken pipe, retrying in 2s
2024/01/19 15:06:26 upload.go:268: 8b5770ff65e7 part 29 attempt 1 failed: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>, retrying in 2s
2024/01/19 15:06:26 upload.go:268: 8b5770ff65e7 part 46 attempt 0 failed: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>, retrying in 1s
2024/01/19 15:06:28 upload.go:268: 8b5770ff65e7 part 17 attempt 1 failed: http status 502 Bad Gateway: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
, retrying in 2s
2024/01/19 15:06:29 upload.go:268: 8b5770ff65e7 part 21 attempt 2 failed: http status 502 Bad Gateway: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>
, retrying in 4s
2024/01/19 15:06:29 upload.go:268: 8b5770ff65e7 part 36 attempt 1 failed: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>, retrying in 2s
2024/01/19 15:06:30 upload.go:268: 8b5770ff65e7 part 32 attempt 1 failed: Put "https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/repositories/olafgeibig/neuralbeagle14/_uploads/71ccdd2d-1df5-427c-a47e-0336116f6d36/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=66040c77ac1b787c3af820529859349a%2F20240119%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240119T140548Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&partNumber=33&uploadId=AG89I7897734mBeKpPOCcPpfst0ffH-JN0e51MIBKt61RgE0Y04JjO1aEf-GfJ5_HzNOft2o5GxTrGRtydY7QSpp0nTCe4xBEOMOKJtP-533BNLZB4eXwwjdJYPdjnGR9cEbQhDpKcVBgI1EyZd4OA3tHoWdPNxR_LfhsbWCw93noq80CNiHV7a9xd4N9J6FE_-t6Tw2_zFE_DhEA4wYDCieek0O32djyLhkQ7GsUvmpUhE97p5X76b_VE5QLbZVJdzlJtijuOk7rz3hSmHR2JCHlUhZO2YhfUYCHKtJw8kSGi-eao9g9h5WPebdDQLicjkEUEm7oUntQbP0XS_KV4E&X-Amz-Signature=92e0d2533f96ee39e2cbb846157da858fc4d088d62d020db576b7772ad3b2257": write tcp 192.168.2.107:51102->104.18.8.90:443: write: broken pipe, retrying in 2s
2024/01/19 15:06:30 images.go:965: error uploading blob: context canceled
[GIN] 2024/01/19 - 15:06:30 | 200 |         1m30s |       127.0.0.1 | POST     "/api/push"
Originally created by @olafgeibig on GitHub (Jan 19, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2094 Originally assigned to: @mxyng on GitHub. CLI: ``` Error: max retries exceeded: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error> ``` Log excerpt: ``` 2024/01/19 15:06:25 upload.go:268: 8b5770ff65e7 part 15 attempt 2 failed: http status 502 Bad Gateway: <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>cloudflare</center> </body> </html> , retrying in 4s 2024/01/19 15:06:25 upload.go:268: 8b5770ff65e7 part 27 attempt 1 failed: Put "https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/repositories/olafgeibig/neuralbeagle14/_uploads/71ccdd2d-1df5-427c-a47e-0336116f6d36/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=66040c77ac1b787c3af820529859349a%2F20240119%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240119T140540Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&partNumber=28&uploadId=AD3DIyDomRmwHs4yel2vHgQoQv_q5TNC8C5kR8nIqa4F2ZvUSA5nedmmMGzj2Kbb2_Z9uVR7hGLLCBYhqA60HOmaQpQBwih3cDQrt6sEzV4xhSX9wR2lK9ufShFf_kUxapuJbrnt1WKBshhGO_dSLeZyMWnS8TXZEsKwg_nGBrDXUXWW9Wzx2bt4E0CLLpaJFcNaH7PeLiL1rNZYCUYjFT-KKtmCiwFwJAX9ACb_IyZQAEQcQYhWb3Roigy1ru2eQps624gxkuZscCNBCtqqaPYZmzatUD7moRyytzJXpTYqqv2uTEGinOD0uUXuHkT7vsRzwpefEfjHWr7faftIwS8&X-Amz-Signature=60121f8d44aff8e6e97c82531b6301f9b0ba595053da9fc17e7da44a3e794997": write tcp [2003:fc:d703:f400:dcdd:9b3:23c8:d35d]:51090->[2606:4700::6812:95a]:443: write: broken pipe, retrying in 2s 2024/01/19 15:06:26 upload.go:268: 8b5770ff65e7 part 29 attempt 1 failed: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>, retrying in 2s 2024/01/19 15:06:26 upload.go:268: 8b5770ff65e7 part 46 attempt 0 failed: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>, retrying in 1s 2024/01/19 15:06:28 upload.go:268: 8b5770ff65e7 part 17 attempt 1 failed: http status 502 Bad Gateway: <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>cloudflare</center> </body> </html> , retrying in 2s 2024/01/19 15:06:29 upload.go:268: 8b5770ff65e7 part 21 attempt 2 failed: http status 502 Bad Gateway: <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>cloudflare</center> </body> </html> , retrying in 4s 2024/01/19 15:06:29 upload.go:268: 8b5770ff65e7 part 36 attempt 1 failed: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>, retrying in 2s 2024/01/19 15:06:30 upload.go:268: 8b5770ff65e7 part 32 attempt 1 failed: Put "https://dd20bb891979d25aebc8bec07b2b3bbc.r2.cloudflarestorage.com/ollama/docker/registry/v2/repositories/olafgeibig/neuralbeagle14/_uploads/71ccdd2d-1df5-427c-a47e-0336116f6d36/data?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=66040c77ac1b787c3af820529859349a%2F20240119%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20240119T140548Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&partNumber=33&uploadId=AG89I7897734mBeKpPOCcPpfst0ffH-JN0e51MIBKt61RgE0Y04JjO1aEf-GfJ5_HzNOft2o5GxTrGRtydY7QSpp0nTCe4xBEOMOKJtP-533BNLZB4eXwwjdJYPdjnGR9cEbQhDpKcVBgI1EyZd4OA3tHoWdPNxR_LfhsbWCw93noq80CNiHV7a9xd4N9J6FE_-t6Tw2_zFE_DhEA4wYDCieek0O32djyLhkQ7GsUvmpUhE97p5X76b_VE5QLbZVJdzlJtijuOk7rz3hSmHR2JCHlUhZO2YhfUYCHKtJw8kSGi-eao9g9h5WPebdDQLicjkEUEm7oUntQbP0XS_KV4E&X-Amz-Signature=92e0d2533f96ee39e2cbb846157da858fc4d088d62d020db576b7772ad3b2257": write tcp 192.168.2.107:51102->104.18.8.90:443: write: broken pipe, retrying in 2s 2024/01/19 15:06:30 images.go:965: error uploading blob: context canceled [GIN] 2024/01/19 - 15:06:30 | 200 | 1m30s | 127.0.0.1 | POST "/api/push" ```
GiteaMirror added the networkingbug labels 2026-04-12 10:58:38 -05:00
Author
Owner

@pdevine commented on GitHub (Mar 11, 2024):

@olafgeibig which platform are you using? (i.e. Windows, Linux, of MacOS). There are some issues with us trying to ramp up concurrency too quickly with CloudFlare, but it's particularly acute w/ Windows.

<!-- gh-comment-id:1989094433 --> @pdevine commented on GitHub (Mar 11, 2024): @olafgeibig which platform are you using? (i.e. Windows, Linux, of MacOS). There are some issues with us trying to ramp up concurrency too quickly with CloudFlare, but it's particularly acute w/ Windows.
Author
Owner

@LaughterOnWater commented on GitHub (Sep 21, 2024):

Windows 10, 64GB | RTX 3090 | Ollama windows install|
@pdevine @mxyng

It's really slow, then it just gives up. Does this have anything to do with cloudflare?
I'd be grateful to learn any way I can make this work.

My upload and download speeds are nominal for other venues. ~450|11.5. Upload should be fairly speedy for a push.

Chris

D:\work\ai\modelfiles>ollama push LaughterOnWater/meta-llama-3.1-70b-instruct-iq2_xs
retrieving manifest
pushing ###munge###...   0% ▕                                                        ▏ 262 KB/ 21 GB  1.5 MB/s    4h2m
Error: max retries exceeded: http status 502 Bad Gateway: <html>
<head><title>502 Bad Gateway</title></head>
<body>
<center><h1>502 Bad Gateway</h1></center>
<hr><center>cloudflare</center>
</body>
</html>


D:\work\ai\modelfiles>ollama push LaughterOnWater/meta-llama-3.1-70b-instruct-iq2_xs
retrieving manifest
pushing ###munge###...   0% ▕                                                        ▏ 262 KB/ 21 GB  1.4 MB/s    4h9m
Error: max retries exceeded: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>

D:\work\ai\modelfiles>ollama push LaughterOnWater/meta-llama-3.1-70b-instruct-iq2_xs
retrieving manifest
pushing ###munge###...   0% ▕                                                        ▏ 327 KB/ 21 GB  1.5 MB/s    4h0m
Error: max retries exceeded: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error>
<!-- gh-comment-id:2365161710 --> @LaughterOnWater commented on GitHub (Sep 21, 2024): Windows 10, 64GB | RTX 3090 | Ollama windows install| @pdevine @mxyng It's really slow, then it just gives up. Does this have anything to do with cloudflare? I'd be grateful to learn any way I can make this work. My upload and download speeds are nominal for other venues. ~450|11.5. Upload should be fairly speedy for a push. Chris ``` D:\work\ai\modelfiles>ollama push LaughterOnWater/meta-llama-3.1-70b-instruct-iq2_xs retrieving manifest pushing ###munge###... 0% ▕ ▏ 262 KB/ 21 GB 1.5 MB/s 4h2m Error: max retries exceeded: http status 502 Bad Gateway: <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>cloudflare</center> </body> </html> D:\work\ai\modelfiles>ollama push LaughterOnWater/meta-llama-3.1-70b-instruct-iq2_xs retrieving manifest pushing ###munge###... 0% ▕ ▏ 262 KB/ 21 GB 1.4 MB/s 4h9m Error: max retries exceeded: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error> D:\work\ai\modelfiles>ollama push LaughterOnWater/meta-llama-3.1-70b-instruct-iq2_xs retrieving manifest pushing ###munge###... 0% ▕ ▏ 327 KB/ 21 GB 1.5 MB/s 4h0m Error: max retries exceeded: http status 502 Bad Gateway: <?xml version="1.0" encoding="UTF-8"?><Error><Code>InternalError</Code><Message>We encountered an internal connectivity issue. Please try again.</Message></Error> ```
Author
Owner

@syui commented on GitHub (May 16, 2025):

I've been having this problem too. I've had this error many times and it's stopped.

Also, the upload size decreases while pushing.

pushing ... 3% ▕ ▏ 632 MB/ 25 GB 593 KB/s 11h25m%
pushing ... 2% ▕ ▏ 619 MB/ 25 GB 593 KB/s 11h26m%
pushing ... 2% ▕ ▏ 609 MB/ 25 GB 571 KB/s 11h52m%
<!-- gh-comment-id:2885809263 --> @syui commented on GitHub (May 16, 2025): I've been having this problem too. I've had this error many times and it's stopped. Also, the upload size decreases while pushing. ```sh pushing ... 3% ▕ ▏ 632 MB/ 25 GB 593 KB/s 11h25m% pushing ... 2% ▕ ▏ 619 MB/ 25 GB 593 KB/s 11h26m% pushing ... 2% ▕ ▏ 609 MB/ 25 GB 571 KB/s 11h52m% ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1199