-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Payload too large error(413) for request with request-body size >100KB in Express #209
Comments
setting a limit requires changes in oas3-tools and it has been fixed in different distribution: Limit is set to 50mb. The distribution with the fix has been released as version 2.3.1: Changes required in applications in order to use new distribution: |
A new NPM package shall be created with the fix required to tune the requestBody size.
Kindly please let me know your views.Thanks. |
I understood that the original oas3-tools repository does not undergo any support any more. |
no problem, I will copy it to /server |
@IswaryaaS please publish npm package to npm registry after #537 is merged. Changes required in applications in order to use new package after publish: |
@MartinSunal , we published the package with updates in PR#537. After following the above steps and testing in Individual applications, got following error. Kindly have a check into this error occurred. |
@MartinSunal , the fix provided by you for this comment on issue works fine. Steps followed to publish in windows environment:
|
In the express framework , by default the request-body size is 100KB.
So, when the request-body exceeds 100KB , we are seeing the error,
"PayloadTooLargeError: request entity too large" with response code 413.
Proposal :
To fix this error , we have to tune the express app to use the customized express/urlencoded/limit and express/json/limit.
Note : Proposal needs to be modified as per the oas3-tools modelling.
Next steps :
Benchmark the maximum possible request-body as per our application requirement to propose value for the
If we are using NGINX , then need to observe whether NGINX allows the configured limit. If NGINX blocks this request , then need to include the following in the .conf file ,
client_max_body_size 25M;
Additional details :
No change required in the OAS specification and loadfile.
The text was updated successfully, but these errors were encountered: