What does it mean when size of a request header field exceeds server limit?

  • #1

Version 18.0.27 Update #1 / Ubuntu 18.04.5 LTS

I have been running RSS server scripts for some time without issues. I often have a page or two up relating to the script that I come back to and can refresh just fine. however lately when go back to such an open open tab in Chrome and refresh I get this error:

Bad Request​

Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Apache Server at default-x_x_x_x Port 443

After some searching I updated the domains Apache & nginx Settings and Additional directives for HTTP + for HTTPS:
LimitRequestLine 16380
LimitRequestFieldSize 16380

However this did not resolve the issue, so I am now rather confused on the next steps. I can sometimes bypass the issue by simply visiting the Plesk logon page and then go back to refresh strange enough. Anyone got some tips?

Chris

What does it mean when size of a request header field exceeds server limit?

  • #2

Please apply the steps below to troubleshoot the issue:

1. Backup the Apache configuration file:

# cp -a /etc/apache2/apache2.conf /root/apache2.conf.backup

2. Add the following line to the Apache configuration file:

LimitRequestFieldSize 16000

3. Restart apache2 service with the command:

# systemctl restart apache2

In case the issue persists, please double the value from 16000 to 32000 and restart apache2 service.

  • #3

Thanks will try it out: might takes a day or more to see if it works though as the error is far apart. That aside, is this not what those Additional directives are supposed to do? I was thinking to go up to 32000, it might of course be that the error consisted due to 16k also not being enough in my case.

What does it mean when size of a request header field exceeds server limit?

  • #4

My suggestion is server-wide, but in Additional directives you apply settings only for one domain.

Sometimes
Bad Request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.

Means: wrong request. Your browser sent a request that the server cannot understand. The size of a request header field exceeds the limit of the server.

The following is a solution. However, I personally feel that it is impossible to increase the size of the request header indefinitely. Therefore, it is still necessary to take some time to clean up the cookie. It must be because too many cookie calls have caused the request header data to be large.

In general, too many cookies are set, resulting in too large request header information.
This is related to the server's setting. The
LimitRequestLine command is used to limit the number of bytes of the HTTP request line sent by the client, allowing the server administrator to increase or decrease the limit on the allowed size of the client HTTP request line. Because the request line includes the HTTP method, URI, and protocol version, the LimitRequestLine command will limit the length of the request URI. The server will need this value to be large enough to load all its resource names, including all the information that may be passed in the query part of the GET request.
The LimitRequestFieldSize command is used to limit the number of bytes in the request header sent by the client, allowing the server administrator to increase or decrease the limit on the size of the HTTP request header field. Generally speaking, the server needs this value to be large enough to accommodate the size of the header field of any request from an ordinary client. The size of a common header field is very different for different clients, and is generally closely related to how users configure their browsers to support more content protocols.
The LimitRequestLine and LimitRequestFieldSize instructions give server administrators greater controllability to control abnormal client request behavior. This helps avoid certain forms of denial of service attacks. The default value is "8190".

Solution:
1. The technician can modify the configuration file
Add in Apache's httpd.conf configuration file

LimitRequestLine 40940 LimitRequestFieldSize 40940

   2. The user can clear the cookie record of the browser

How do I fix bad request size for request header field exceeds server limit?

This issue can be caused by corrupted cookies. Clear the cache and remove the cookies from websites that cause problems via the "3-bar" Firefox menu button (Options/Preferences). "Clear the cache: Options/Preferences -> Privacy & Security -> Cached Web Content: "Clear Now"

How do you fix bad request your browser sent a request that this server could not understand?

How to Fix 400 Bad Request Error.
Check the Submitted URL..
Clear Browser Cache..
Clear Browser Cookies..
File Upload Exceeds Server Limit..
Clear DNS Cache..
Deactivate Browser Extensions..

What does it mean when it says your browser sent a request that this server could not understand?

The 400 Bad Request error is an HTTP status code that means that the request you sent to the website server, often something simple like a request to load a web page, was somehow incorrect or corrupted and the server couldn't understand it.