How to resolve the errors "URI Too Long" or "Request Header Fields Too Large" in TIBCO Cloud API Management-Local Edition?
book
Article ID: KB0072644
calendar_today
Updated On:
Products
Versions
TIBCO Cloud API Management - Local Edition
All
Description
When handling a long URI, CAPIM-LE returns the below error: --------------- <h1>Bad Message 414</h1> <pre>reason: URI Too Long</pre> ------------------------ By default this error is returned if the URI length is >8192.
When there are a large number of headers, CAPIM-LE returns the below error: --------------- <h1>Bad Message 431</h1> <pre>reason: Request Header Fields Too Large</pre> ------------------
These errors are returned by the underlying Jetty and limits are below bufferSize properties: "responseHeaderBufferSize": 16384, "requestHeaderBufferSize": 16384,
Issue/Introduction
This article provides info on resolving the above errors in CAPIM-LE.
Environment
All Supported Platforms
Resolution
To resolve this the values set for the buffersize properties should be increased. Usually setting the values to 65536 should suffice.
On CAPIM-LE 5.x clusters - This change should be done in tml_tm_properties.json file - For the change to take effect, redeploying the TM container/pod will suffice.
On CAPIM-LE 4.x clusters - Connect to the Docker container or VM. - Edit /etc/mashery-proxy-config.json. - Change the com.mashery.proxy.server properties as below: "com.mashery.proxy.server": { "http.enabled": true, "http.port": 80, "jetty.requestHeaderBufferSize": 100000 } - Save and exit. - Restart the javaproxy: service javaproxy restart - Set jetty.requestHeaderBufferSize to your new limit in bytes.
= To change response header size set the property "jetty.responseHeaderBufferSize."