을 업로드하는 동안 'System.OutOfMemoryException'유형의 예외가 발생했습니다. 큰 8GB 파일을 압축하고 Blob에 압축 파일을 업로드하려고합니다. 압축 파일 크기는 약 800MB입니다. 이제 Azure로 업로드하려고하면 예외가 발생합니다. 'System.OutOfMemoryException "최소 3 ~ 4 개의 파일을 압축하는 중 크기가 3Gb, 4GB, 8GB 인 동시에 BLOB에 업로드하십시오.Blob
다음은 코드입니다.
를 압축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);
}
임은 64 비트 윈도우 2K8 서버와 기가 바이트 램에서 실행 해.이 문제 또는 모든 주소 공간 문제를 RAM이다. 이 문제에 제발 도와주세요
-Mahender
-Mahender
전체 8GB 파일을 메모리에 단일 바이트 배열로 읽는 것처럼 보입니다. 아마 그럴 일은 없을 것입니다. 대신 파일로 스트림을 열고 청크로 작업 할 수 있는지를 알 수 있습니다. – vcsjones