Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud run 32mb request size limit #1392

Closed
rozhanroukhosh opened this issue Jan 30, 2021 · 3 comments
Closed

cloud run 32mb request size limit #1392

rozhanroukhosh opened this issue Jan 30, 2021 · 3 comments
Assignees
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: question Request for information or clarification. Not an issue.

Comments

@rozhanroukhosh
Copy link

rozhanroukhosh commented Jan 30, 2021

i want to be able to upload videos and files which there size is more than 32MB, i used the following code below but after all i get error 413. how can i use nodejs and upload files with size bigger than 32mb?

let options = {
  configPath: destination,
  resumable: true,
  highWaterMark: 128 * 1024,
  metadata: {
    gzip: true,
    cacheControl: 'public, max-age=31536000',
  },
};
let uploadingFile = bucket.file(destination);
await new Promise(resolve =>
  fs
    .createReadStream(file.path)
    .pipe(uploadingFile.createWriteStream(options))
    .on('error', function (err) {
      console.log('error happened', err);
    })
    .on('finish', resolve)
);
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/nodejs-storage API. label Jan 30, 2021
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Jan 31, 2021
@shaffeeullah shaffeeullah added the type: question Request for information or clarification. Not an issue. label Feb 1, 2021
@yoshi-automation yoshi-automation removed the triage me I really want to be triaged. label Feb 1, 2021
@shaffeeullah
Copy link
Contributor

Hi @rozhanroukhosh , Cloud Run has a 32MB maximum request size. To circumvent this limit, there are two recommended options:

  1. Leverage V4 Signed URLs to upload the object. This will allow you to upload to Cloud Storage directly.
  2. Leverage HTTP/gRPC server streaming for Cloud Run. If you are able to do streaming uploads, you can use transfer-encoding: chunked behavior.

@shaffeeullah shaffeeullah self-assigned this Feb 8, 2021
@shaffeeullah
Copy link
Contributor

Please reopen if you are still having issues.

@shaffeeullah
Copy link
Contributor

For more information on bypassing the Cloud Run 32mb limit, please see this blog post: https://medium.com/google-cloud/bypass-the-cloud-run-32mb-limit-with-cloud-storage-65c24156189

gcf-owl-bot bot added a commit that referenced this issue Apr 6, 2022
Co-authored-by: Jeffrey Rennie <rennie@google.com>
Source-Link: googleapis/synthtool@9368bc7
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:f74e740638e66be7ced1540626217dbb72980eb73885b2339a70592f38c9ff2c
gcf-merge-on-green bot pushed a commit that referenced this issue Apr 6, 2022
Co-authored-by: Jeffrey Rennie <rennie@google.com>
Source-Link: googleapis/synthtool@9368bc7
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:f74e740638e66be7ced1540626217dbb72980eb73885b2339a70592f38c9ff2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/nodejs-storage API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants