Support Forums

Started getting Function.ResponseSizeTooLarge error

Hi, I’m using Netlify functions and started getting the below error for some of my endpoints:

  "errorMessage": "Response payload size exceeded maximum allowed payload size (6291556 bytes).",
  "errorType": "Function.ResponseSizeTooLarge"

What is strange is that I just started getting this error within the last couple of weeks. Nothing has changed that would have increased the response size, so in theory I should have been getting this error a long time ago.

Also, this is only in production. Locally I don’t run into this issue (I am using netlify dev to run my project locally).

I believe AWS Lambda functions have a max response size of 6MB. I have one example where (running locally) 983KB are transferred over the network, with the resource size being 5.9MB. This works locally but does not in production. I would expect that it would given that it’s under 6MB.

Was there anything introduced recently that would have caused this issue to start occurring now? The app I’m working on fetches a lot of data for plotting on a graph, so we should have seen this before now.

Hey @coreysf,

Could you share the site (or the function) URL?

Could you please mention how to trigger or reproduce this issue?