Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Troubleshooting "Request Entity Too Large" (HTTP 413) error message returned to browser

Occasionally users of our web application encounter the following error message:

Request Entity Too Large
The requested resource
/ourapp/ourlocation/
does not allow request data with GET requests, or the amount of data provided in the request exceeds the capacity limit.

We checked our logs, but we were unable to find any entries that seem to correlate with the error above. After doing a little research, I believe that the issue is that some aspect of the request is too large for certain proxy servers and the proxy is returning the 413 error to the user's web browser. (This is just a guess, though.)

Do you have any ideas for figuring out what is causing this error? So far, I have used the Charles Web Debugging Proxy and LiveHTTPHeaders to try and observe how many bytes each request to a given page is using.

Here are a few other questions that might aid in my troubleshooting.

  1. What is the max cookie size allowed? 4096 bytes?
  2. What parts of a GET request count against the capacity limit referenced in the error message?
  3. What is the max size of a GET request?
like image 524
braveterry Avatar asked May 18 '09 19:05

braveterry


1 Answers

If it is a proxy server returning the error, then I would expect there to be another response header that has the proxy's name in there somewhere. Maybe an "X-Via" or "Server" header?

To your questions... 1 & 3 are up to the proxy server. 2: I would imagine every byte in the request would count towards the limit.

To test this, I would create a console app that would keeping sending larger & larger "GET" requests until it recieved a 413 back. Then you could get one of these users to run it and see if it is reproducible.

like image 158
David Avatar answered Sep 27 '22 18:09

David