anmoln4 opened a new issue, #12437:
URL: https://github.com/apache/apisix/issues/12437

   ### Description
   
   Users encounter 400 Bad Request: Request Header Or Cookie Too Large.
   
   logs:
   
   2025/07/16 10:59:15 [info] 53#53: *2841 client sent too long header line: 
"key: value.."
   
   Config.yaml:
   
   nginx_config:    # config for render the template to genarate nginx.conf
     error_log: "/dev/stderr"
     error_log_level: "info"    # warn,error
     worker_processes: "auto"
     enable_cpu_affinity: true
     worker_rlimit_nofile: 20480  # the number of files a worker process can 
open, should be larger than worker_connections
     event:
       worker_connections: 10620
     meta:
       lua_shared_dict:
         prometheus-metrics: 15m
       
     http:
   
       enable_access_log: true
       access_log: "/dev/stdout"
       access_log_format: '$remote_addr - $remote_user [$time_local] $http_host 
\"$request\" $status $body_bytes_sent $request_time \"$http_referer\" 
\"$http_user_agent\" $upstream_addr $upstream_status $upstream_response_time 
\"$upstream_scheme://$upstream_host$upstream_uri\"'
       access_log_format_escape: default
       keepalive_timeout: 60s         # timeout during which a keep-alive 
client connection will stay open on the server side.
   
       client_body_timeout: 60s       # timeout for reading client request 
body, then 408 (Request Time-out) error is returned to the client
       send_timeout: 10s              # timeout for transmitting a response to 
the client.then the connection is closed
       underscores_in_headers: "on"   # default enables the use of underscores 
in client request header fields
       real_ip_header: "X-Real-IP"    # 
http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
       real_ip_from:                  # 
http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
         - 127.0.0.1
         - 'unix:'
      
       client_header_buffer_size: 1m       # 1MB initial buffer
       large_client_header_buffers: 4 2m   # 8MB total header buffer (4 buffers 
× 2MB)
   
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.8.0
   - Operating system (run `uname -a`): Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):  
openresty/1.21.4.2
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to