HTTP Error 431 - Request Header Fields Too Large

0
Has anyone seen HTTP Error 431 "Request Header Fields Too Large" in their apps or logs when runnning on Mendix Cloud? I have some users getting this.The problem is that when the users get the error, I'm not in a position to capture the headers (they're front-line workers at a Telco -- they don't have the knowledge or skill to go into browser dev tools and capture the headers for me).In the access logs, I can see the failing requests have very large "request_length_in_bytes" sizes -- some are apporaching 10KB (remember, this is just headers in GET requests, so 10,000 characters or so worth of headers).Unfortunately, the access logs do not capture the headers. And since these are rejected by the web server itself, they never git a microflow where I can capture them.You can configure Nginx to capture headers in logs, but I don't believe that setting is exposed by Mendix Cloud.
asked
1 answers
0

Hi,

This is most likely related to oversized cookies.

For GET requests, a request size close to 10 KB usually points to a very large Cookie header rather than the request itself.


Since the request is rejected by the web server before it reaches the Mendix runtime, you won’t see the headers in app logs.


An easy way to verify this would be to ask affected users to open the app in an incognito browser window. If the issue does not occur there, then browser cookies or cached site data are probably the cause.


I would also check SSO configuration (large tokens) and proxy/VPN software adding extra headers.

answered