在Amazon S3上上传视频 - “处理太多了!退出代码137”

时间:2014-06-27 12:52:52

标签: amazon-ec2 amazon-s3

我正在尝试将视频文件上传到我的亚马逊水桶。下面是我用来执行此操作的代码。我按照亚马逊文档上的example进行了操作。

它开始并且说太多了,无法处理!"并以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();
    }

1 个答案:

答案 0 :(得分:0)

发现问题。这是我的多部分解析器!我需要增加内存大小的最大值。 multipartResolver.setMaxInMemorySize(90971520);