413 error in Vercel serverless functions but payload size is (apparently) smaller than 4.5MB
Unanswered
Cory's Shearwater posted this in #help-forum
Cory's ShearwaterOP
We're getting those 413 errors in some pages in production (and preview environments) for some of the biggest content pages on our site.
However, when checking the size of the payload returned from
The method used to check was suggested by Vercel's AI support assistant:
According to that log, the payload I'm returning is around 1MB, nowhere near the limit of 4.5MB, but I'm still getting 413 errors.
Of course I could only check the log in the local environment, but I'm ponting to production DBs and services for this test, so that data is 100 % the same as in production.
Any ideas about where the discrepancy might come from?
However, when checking the size of the payload returned from
getServerSideProps it seems to be much much smaller.The method used to check was suggested by Vercel's AI support assistant:
console.info(
'payload size',
new Blob([JSON.stringify(payload)]).size / 1024 / 1024
);According to that log, the payload I'm returning is around 1MB, nowhere near the limit of 4.5MB, but I'm still getting 413 errors.
Of course I could only check the log in the local environment, but I'm ponting to production DBs and services for this test, so that data is 100 % the same as in production.
Any ideas about where the discrepancy might come from?