question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upload blob failed each time after 15 minutes

See original GitHub issue

Which service(blob, file) does this issue concern?

blob

Which version of the SDK was used?

0.12.0

On which platform were you using? (.Net Framework version or .Net Core version, and OS version)

.Net Core

How can the problem be reproduced? It’d be better if the code caused the problem can be shared.

What problem was encountered?

If I have a slow connection upload blob failed each time after 15 minutes with message: One or more errors occurred. (The transfer failed.)

With normal connection the upload works fine. This is my code:

CloudBlockBlob blockBlob = new CloudBlockBlob(new Uri(sConnString));
ServicePointManager.Expect100Continue = false;
TransferManager.Configurations.ParallelOperations = 10;
...
var task = TransferManager.UploadAsync(pathFile, blockBlob, null, context, CancellationToken.None);                
task.Wait();

How can I solve it?

Have you found a mitigation/solution?

No

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
epi82commented, Jul 12, 2019

It seems works. I’ve tried with a function like this:

private int GetParallelOperations(double transfertSpeed)
        {
            int retval = 0;
            switch (transfertSpeed)
            {
                case double n when (n >= 1):
                    retval = Environment.ProcessorCount * 8;
                    break;
                case double n when (n < 1 && n>=0.1):
                    retval = 10;
                    break;                
                default:
                    retval = 2;
                    break;
            }

            return retval;
        }

and then used:

TransferManager.Configurations.ParallelOperations = GetParallelOperations(Utilities.TransferSpeed);

where transfer speed is stimated with a simple file with size 5MB. For speed test I left “ParallelOperations” set to “Environment.ProcessorCount * 8” (works also in case of slow connection).

0reactions
santhoshherecommented, Nov 12, 2020

It seems works. I’ve tried with a function like this:

private int GetParallelOperations(double transfertSpeed)
        {
            int retval = 0;
            switch (transfertSpeed)
            {
                case double n when (n >= 1):
                    retval = Environment.ProcessorCount * 8;
                    break;
                case double n when (n < 1 && n>=0.1):
                    retval = 10;
                    break;                
                default:
                    retval = 2;
                    break;
            }

            return retval;
        }

and then used:

TransferManager.Configurations.ParallelOperations = GetParallelOperations(Utilities.TransferSpeed);

where transfer speed is stimated with a simple file with size 5MB. For speed test I left “ParallelOperations” set to “Environment.ProcessorCount * 8” (works also in case of slow connection).

What is the unit of measure for transferspeed? kbps or mbps and what’s the calculation on the switch case? please explain

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure upload blob failed after 15 minutes
If the connection is slow every time after 15 minutes the upload failed with error: One or more errors occurred. (The transfer failed.)...
Read more >
Frequent az storage blob upload timeout error on macOS
If the operation is taking longer than 10 minutes per MiB on average, the operation will timeout. Also verify if there are any...
Read more >
Upload Large Files to Azure Blob Storage with Python
Since I have already set the timeout as 20 mins, the error shouldn't be caused by timeout settings. Kept searching, until I read...
Read more >
Azure Blob Storage Input | Filebeat Reference [8.9]
When processing azure blob containers, if suddenly there is any outage, the process will be able to resume post the last file it...
Read more >
Troubleshooting app deployment and health
By default, your app has 15 minutes to stage and 5 minutes to start. ... After cf push stages the app and uploads...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found