Resolving login problems by increasing HTTP header size

You can resolve login problems for the API Manager UI by increasing the maximum HTTP client header size.

About this task

Login attempts to the user interface might fail with error 502 (Bad Gateway). This error can occur when logging in from a browser that has a large number of cookies. The error occurs because size of the login request exceeds the maximum HTTP client header size.

The maximum HTTP client header size is limited for security reasons. To workaround this issue, you can clear the browser cache and cookies, or open an incognito window from the browser, and then retry the login.

Alternatively, you can increase the maximum HTTP client header size. Use caution when increasing the maximum size because larger headers can raise a security risk to your system.


  1. SSH to your management system or appliance.
  2. Enter the following commands:
    kubectl get deployment -n namespace  | grep apim-v2
    kubectl edit deployment -n namespace apiconnect-apim-v2-deployment
  3. In the env section of the deployment configuration, change --max-http-header-size=12000 to a larger value that works for your environment. For example:
     - name: NODE_OPTIONS
              value: --max-old-space-size=8094 --max-http-header-size=16000
  4. Save the updated configuration.
  5. Run kubectl get pod -n namespace a few times until the new apiconnect-apim-v2 pod is up and running.