413 “Request Entity Too Large” error with uploading a file



In assets when uploading a medium size file I get this error:

Failed to load resource: the server responded with a status of 413 (Request Entity Too Large)

What does it mean? And how to fix?

Johannes Lamers

Posted 2014-09-03T15:41:53.440

Reputation: 1 247



413 errors occur when the request body is larger than the server is configured to allow. Here’s how you can fix it, depending on your web server:

You also might want to try increasing PHP’s upload_max_filesize and post_max_size settings in php.ini or using the php_value directive in your .htaccess file if you’re using Apache (http://davidwalsh.name/php-values-htaccess).

Brandon Kelly

Posted 2014-09-03T15:41:53.440

Reputation: 27 245

From the client side, you could try to switch to SSH, that's what got it working for me. Here is the manual I scripted on the topic: https://github.com/gitblit/gitblit/issues/461

– milosmns – 2017-03-11T02:12:34.120


You need to configure both nginx and php to allow upload size.

Nginx configuration

The client_max_body_size directive assigns the maximum accepted body size of client request, indicated by the line Content-Length in the header of request. If size is greater the given one, then the client gets the error "Request Entity Too Large" (413).



Posted 2014-09-03T15:41:53.440

Reputation: 121


Spent a whole day working with the administrator at our web host trying to solve this problem. All the fixes suggested here and other sites did not help. The problem turned out to be with my third party VPN. Once that connections was turned off I was able to upload and install a Joomla extension without problem. So if you are getting a 413 message and nothing seems to fix it check that your VPN is not the culprit.

Harry Couchman

Posted 2014-09-03T15:41:53.440

Reputation: 11

FYI... If the VPN was an issue that would mean that your company is not doing split tunneling (very common). Easy to see in most VPN route tables. If the route tables show that means all traffic is routed over the VPN when connected. This also means when you connect to websites and other resources you are traversing your company network. So keep that in mind when you are connected. – None – 2015-09-01T15:51:07.167