2

I wrote a Cloud Run app to accept a user file upload, do some processing to it, and respond with the processed output. It failed, saying "HTTP response was too large: 50930613. The limit is: 33554432."

I have an idea to upload the file to GCS instead, and have my app redirect to the GCS location. But before I set all that up, am I going to run into the same issue, with egress being limited to 32MB? I've seen a SO question saying that that is the case for AppEngine.

philo
  • 3,580
  • 3
  • 29
  • 40
  • 1
    I deleted my answer. I just confirmed that I cannot download a file larger than 32 MB from Cloud Run Managed. – John Hanley Aug 02 '19 at 06:34

2 Answers2

4

Your idea is correct, since the response from Cloud Run is also limited to 32MB.

You would need to:

1- Process the data and upload it to a Cloud Storage bucket using the client libs (depending on the language that you are using).

2.- Point the user to the download url of the object. You can also use signed urls if you want to keep the object private, but according to your use case you might not need to (since you will delete the file shortly after either way).

Mayeru
  • 1,044
  • 7
  • 12
0

I was able to send that same file to GCS using the client libraries. I don't want to say for sure that there's no limit, but at least 50MB is fine.

philo
  • 3,580
  • 3
  • 29
  • 40
  • 1
    the maximum size that you can upload per object is 5TB (https://cloud.google.com/storage/quotas#objects), is not the same limitation as the "response message" because you are communicating directly with the API and not handling the request from a client. – Mayeru Aug 05 '19 at 07:48
  • @Mayeru Can you explain how to do this? – Ismail Farooq Oct 12 '22 at 11:27
  • @Ismail Farooq The explanation on how to work around this limitation is on the accepted answer. – Mayeru Oct 21 '22 at 12:09