‘ParallelOperationThreadCount’ is larger than maximum of ’64’

The above exception occur when you upload a blob that is greater than the value specified by the SingleBlobUploadThresholdInBytes property, it is automatically divided into blocks that are uploaded individually and assembled into the complete blob by the service. The ParallelOperationThreadCount property specifies how many blocks may be uploaded simultaneously.

However the maximum possible number of blocks is 64, thus the exception occur when the number of divided blocks are larger than 64.

There are two solution to this problem. One would be to set the SingleBlobUploadThresholdInBytes to a higher limit of which the maximum possible size is 64MB, the other solution would be to set ParallelOperationThreadCount to 1 as shown in the below code.

            //Create a new client object.
            CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
            blobClient.ParallelOperationThreadCount = 1;

For more details, refer to the official documentation from MSDN:
CloudBlobClient.ParallelOperationThreadCount Property
Best Practice for handling huge data

Advertisements
This entry was posted in Azure and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s