Apigee X Request header size limit exceeds

Hi All,

As part of our project we are doing performance improvement PoC where a customer hierarchy will be stored in user token (Oauth 2.0 access token) to help reduce the number of network calls to our backend systems.

This access token is passed as Bearer token in Authorization header in the Apigee X API request call.
The existing token size is 4KB but we are trying to pass the Enriched token with Bulk hierarchy, for which size is 414KB approximately.

Flow is : Postman -> Apigee X -> Okta -> Apigee X -> Backend.

Okta is providing us Access tokens here.

Getting below error "413 Request Entity Too Large" while making an Apigee X API call from postman using the enriched token (bigger size as injected with bulk hierarchy) within request headers. The request is not even reaching Apigee X when checked in Debug session. So would like to know where this request is getting rejected? Is it somewhere in Load balancer level ?

<html>

<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>413 Request Entity Too Large</title>
</head>

<body text=#000000 bgcolor=#ffffff>
<h1>Error: Request Entity Too Large</h1>
<h2>Your client issued a request that was too large.
</h2>
<h2>
<script>
(function() { var c=function(a,d,b){a=a+"=deleted; path="+d;null!=b&&(a+="; domain="+b);document.cookie=a+"; expires=Thu, 01 Jan 1970 00:00:00 GMT"};var g=function(a){var d=e,b=location.hostname;c(d,a,null);c(d,a,b);for(var f=0;;){f=b.indexOf(".",f+1);if(0>f)break;c(d,a,b.substring(f+1))}};var h;if(4E3<unescape(encodeURI(document.cookie)).length){for(var k=document.cookie.split(";"),l=[],m=0;m<k.length;m++){var n=k[m].match(/^\s*([^=]+)/);n&&l.push(n[1])}for(var p=0;p<l.length;p++){var e=l[p];g("/");for(var q=location.pathname,r=0;;){r=q.indexOf("/",r+1);if(0>r)break;var t=q.substring(0,r);g(t);g(t+"/")}"/"!=q.charAt(q.length-1)&&(g(q),g(q+"/"))}h=!0}else h=!1;
h&&setTimeout(function(){if(history.replaceState){var a=location.href;history.replaceState(null,"","/");location.replace(a)}},1E3); })();

</script>
</h2>
</body>

</html>

As per https://cloud.google.com/apigee/docs/api-platform/reference/limits,  Request header size is 60 KB in Apigee X.
Is there any possibility that we can handle 400KB-500KB access token size in Apigee X request headers while sending a request to backend. Please advise.

@kurtkanaskie 

@dchiesa1 

@shrenikkumar-s 

1 1 383
1 REPLY 1

According to the docs: https://cloud.google.com/load-balancing/docs/quotas#https-lb-header-limits

The Maximum client request header size for external HTTP(S) Load Balancing is 64 KB (kilobytes). This limit cannot be increased. The combined size of the request URL and request header must be less than or equal to 64 KB.