views:

3026

answers:

2

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?
+3  A: 

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.

David
A: 

For nginx acting as reverse proxy i had to add:


 proxy_set_header  Destination   $dest;
 client_max_body_size       1000m; #100m shoul'd do fine too
 client_body_buffer_size    128k;

 proxy_connect_timeout      90;
 proxy_send_timeout         90;
 proxy_read_timeout         90;

 proxy_buffer_size          4k;
 proxy_buffers              4 32k;
 proxy_busy_buffers_size    64k;
 proxy_temp_file_write_size 64k;
dz0ny