Request Entity Too Large error while uploading files of more than 128KB over SSL

I managed to solve it by putting certain configuration in apache httpd.conf file. Here is the sample configuration:

<Location "/calibration">
  SSLRenegBufferSize 10486000
</Location>

Earlier i was not giving correct configuration. Key is the exact URL location which is causing http 413 error. In the location directive exact URL location needs to be given. SSLRenegBufferSize is the param which specifies the max buffer size in bytes in case a renegotiation happened. I had set it to 10 MB. Apache default is 128KB.


This problem occurs during an SSL renegotiation. In addition to setting the renegotiate buffer size on Apache to a very high number you have a few other options:

  • Configure your (virtual) host to use only a single authentication scheme to avoid renegotiation all together
  • Use a client that supports HTTP 1.1 Expect Header

See https://stackoverflow.com/questions/14281628/ssl-renegotiation-with-client-certificate-causes-server-buffer-overflow