ARTIFACTORY: How to resolve large request header errors and increase limit

Products
Frog_Artifactory
Content Type
Administration_Platform
AuthorFullName__c
Paul Pan
articleNumber
000007140
FirstPublishedDate
2026-08-27T11:53:46Z
lastModifiedDate
2026-08-27

ARTIFACTORY: How to resolve large request header errors and increase limit

Symptoms
When HTTP headers or cookies exceed maximum buffer limits, client calls will fail with one of the following errors:
  • 400 Bad Request: Request Header Or Cookie Too Large
  • 431 Request Header Fields Too Large


Root Causes
Header size is determined by the total sum of all request headers. Common causes for oversized headers include:
  1. Bloated Auth Tokens: SAML/OIDC tokens containing thousands of unnecessary group assertions or runaway domain cookie accumulation.
  2. Proxy Overhead: Too many custom headers added at the Layer 7 load balancer or reverse proxy level.
  3. Restrictive Defaults: Default allowed header sizes set too low for environment demands.


Default Header Size Limits
  • Nginx: 8 KB
  • Artifactory UI: 16 KB
  • Artifactory Service: 8 KB
  • Router: 64 KB


How to Increase Header Size Limits?
Nginx Configuration
Update nginx.conf within the relevant server block:
Nginx
server {
    ...
    # Applies to requests hitting this server block
    large_client_header_buffers 4 32k;

    location / {
        ...
    }
}


Artifactory Configuration (`system.yaml`)
Update `system.yaml` on each node in an HA cluster, followed by a full service restart
artifactory:
  tomcat:
    connector:
      extraConfig: "maxHttpHeaderSize='32768'"
access:
  tomcat:
    connector:
      extraConfig: "maxHttpHeaderSize='32768'"
frontend:
  env:
    NODE_OPTIONS: "--max-http-header-size=32768"


Risks of Increasing Header Limits
  • Memory Exhaustion: Increasing header buffer limits (e.g., from 8 KB to 32 KB) increases RAM consumption per request, heightening vulnerability to Out-Of-Memory (OOM) errors.
  • Performance Overhead: Parsing and validating oversized header strings increases CPU usage, memory allocation, and Garbage Collection (GC) pressure.
Note:

Increasing header limits should serve as a temporary mitigation. Investigating and reducing actual header size is strongly recommended.