2014-06-27 45 views
0

我試圖將視頻文件上傳到我的亞馬遜存儲桶。以下是我正在使用的代碼。我遵循亞馬遜文檔上的example在Amazon S3上傳視頻 - 「處理太多了!退出代碼爲137」

它開始,並說「太多處理!」並以137退出。爲什麼上傳失敗?視頻的大小隻有80 MB。

String existingBucketName = "***mybucket***"; 
    String keyName ="***myVideo.mov***"; 
    String filePath = "***/Users/myhomedir/Desktop/myVideo.mov***"; 

    TransferManager tm = new TransferManager(new ProfileCredentialsProvider()); 
    System.out.println("Hello"); 
    // TransferManager processes all transfers asynchronously, 
    // so this call will return immediately. 
    Upload upload = tm.upload(
      existingBucketName, keyName, new File(filePath)); 
    System.out.println("Hello2"); 

    try { 
     // Or you can block and wait for the upload to finish 
     upload.waitForCompletion(); 
     System.out.println("Upload complete."); 
    } catch (AmazonClientException amazonClientException) { 
     System.out.println("Unable to upload file, upload was aborted."); 
     amazonClientException.printStackTrace(); 
    } 

回答

0

發現問題。這是我的多重解析器!我需要增加內存大小的最大值。 multipartResolver.setMaxInMemorySize(90971520);