Closed dk1010101 closed 1 year ago
Thanks for informing. You can try below options. Check the maximum request length setting in the host.json file. By default, the maximum request length is set to 100 MB. If this value is set lower, you may encounter issues with larger request bodies.
Check the timeout setting for your function. If the function takes too long to process the request, the server may terminate the connection and return a 400 or 403 error.
Check the Azure Function App's network configuration. If there are any firewalls or network security groups in place, they may be blocking requests with larger payloads.
Check if there are any restrictions on the size of requests that can be handled by the Python runtime environment in Azure Functions. you can refer some documents.
Host.json file documentation: https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json
Timeout documentation: https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json#functiontimeout
Azure Function App networking documentation: https://docs.microsoft.com/en-us/azure/azure-functions/functions-networking-options
Azure Functions Python developer guide: https://docs.microsoft.com/en-us/azure/azure-functions/functions-reference-python if its not working then pls let me know.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Thanks @bhagyshricompany I'll have a look and will report back.
Apologies, i was away - Easter Hols. @bhagyshricompany - I don't know why this ticket had been marked as closed as it has not been resolved.
I looked at the suggestions above and here are my comments:
i had looked through all the links provided before posting the question and i had another look just in case. i also searched all the pages for the max size and related keywords with little success. I think this is something lower down which is why i asked here and any help/suggestions would be most appreciated.
I originally raised this on the azure-functions-docker as this could be a Linux thing but equally it could be a azure fn python issue. See https://github.com/Azure/azure-functions-docker/issues/866. Apologies for cross-posting but i am not sure what the best place would be for this issue.
Basically, we have noticed that requests to (non-durable) azure python functions (running on premium p2v3) fail with 400 or 403 when the POST body size is greter than 100k (400 is the most common but 403s happen occasionaly). The called function body never gets executed. Running the same functions locally on windows using core tools works fine and as expected (ie it works up to 100M and then the caller throws). POST requests with body sizes of 100K or less work in all cases and never report 400s or 403s.