Issue
When calling the REST API of a Mendix application deployed in Mendix on Kubernetes, the following error occurs.
The remote endpoint returned an error (HTTP '431'). Please try again later. Environment
Applications hosted in Mendix on Kubernetes
Cause
The default request header size limit is 8 * 1024 bytes. The HTTP 431 (Request Header Fields Too Large) error means the server received a request with a request header size that exceeds the limit.
Solution / Workaround
The recommended workaround is to reduce the header size so that it does not exceed the limit. Alternatively, for apps deployed on Mendix on Kubernetes, the header size limit can be increased using Custom Jetty Options.
- Navigate to the Runtime tab of the environment details page.
-
Set the header size limit value under Custom Jetty Options. If leaderless mode is enabled, set the value using the following format.
{ "requestHeaderSize": 65536, // Put desired value here "responseHeaderSize": 65536 // Put desired value here }For non-leaderless mode, set the value using the following format.
{ "request_header_size": 65536, // Put desired value here "response_header_size": 65536 // Put desired value here } - Click the Save and Apply button
Internal information related
- 282623, 280346
- C0161BEMQ4B/p1783437273677029
Additional information
Not Applicable
0 Comments