Background Functions POST Limit

Is there a POST request size limit for background functions? I’m running into an issue where posting an empty body to the function returns 202 as expected, but posting large body (i.e. images) results in a few seconds delay while the request is pending, then a 500 error gets returned, with no function logs in the dashboard.

I was using ordinary functions for this, which worked, but resulted in a long delay while the function processed the request (it accepts some JSON data and some images, and turns that data into a PDF and emails it) so I wanted to try using background functions… but this resulted in the above error.

Hey there, @travisreynolds :wave:

Thanks for reaching out and asking about this. We’ll need a bit more information in order to dig into this. Can you share your Netlify site ID?

1 Like

Sure thing - b1855218-7b00-4fba-a72d-91700d23ff5f

Hey @travisreynolds,
Thanks for sharing that. I dug in and found that you are in fact running into a request size limitation. Background Functions are a different type of invocation “under the hood” than our regular functions, and have a much smaller request size limit- I think it’s something like 250-300kb. I will see if we can get that added to our docs. Let us know if you have any other questions and we’ll be happy to answer.

1 Like

Thanks for the update Jen, appreciate you looking into it.

1 Like