Cloud Run returns 413 Request Entity Too Large

Special Hot Alien
1 min readJul 18, 2022

--

Photo by Sigmund on Unsplash

A 413 error occurred while using the nest.js framework, and we were trying to figure out the cause. The situation occurred when three 12mb files were registered in the large size image upload api. When I registered 2, it was normal, but when I registered 3, a problem occurred, so I first suspected the request size limit in nest.

import { json, urlencoded } from ‘body-parser’;app.use(json({ limit: ‘50mb’ }));
app.use(urlencoded({ extended: true, limit: ‘50mb’ }));

As a result of investigating the resource restrictions of cloud run, it was confirmed that the request size limit is up to 32mb, and there is no solution to increase the limit. Instead, you can use a signed url to directly upload to cloud storage.

--

--