Im trying to compress a large 8gb file and upload the compressed file into Blob. The Compressed File Size comes to around 800MB. Now when i try to upload into Azure, I get exception' System.OutOfMemoryException" Im Compressing atleast 3-4 Files while are of size 3Gb, 4GB, 8GB in parallel and Keep the uploading into BLOB.
Here is the code for Compressing
public string UploadFile(string fileID, string fileName, string choice,Stream CompressedFileStream)
{
byte[] data = new byte[CompressedFileStream.Length];
CompressedFileStream.Read(data, 0, data.Length);
long fileSize = CompressedFileStream.Length;
inputStream.Dispose();
}
blob.ServiceClient.WriteBlockSizeInBytes = 4 * 1024 * 1024;
blob.ServiceClient.ParallelOperationThreadCount = 5;
//this will break blobs up automatically after this size
blob.ServiceClient.SingleBlobUploadThresholdInBytes = 12582912;
startTime = DateTime.Now;
using (MemoryStream ms = new MemoryStream(data))
{
ms.Position = 0;
blob.UploadFromStream(ms);
}
Im runnning on 64 bit windows 2k8 server and 4GB ram. Is it RAM Issue or Any Address Space Issue. Please help me on this issue
-Mahender
-Mahender