I use SVN (Subversion) for a lot of my projects and like many projects some can become quite large in filesize. One issue I discovered recently is I kept getting a strange error when trying to commit a change that involved a large .tar.gz file. In my commit log I kept getting “413 Request Entity Too Large” which prevented me from committing the latest changes. After looking around I found a fix for the issue, but it seems there are many ways to solve this error.
The problem seems to be caused by Apache itself. It has DOS protection on request body size by default. In most cases the size of the requests are small and don’t get triggered by the DOS protection, however for larger files in a SVN repository, Apache is going to get in the way when trying to commit a larger changeset
LimitXMLRequestBody 0 LimitRequestBody 0
This fix requires you to add the following lines to your Apache (httpd.conf). In my case I added the above lines into my SSL virtual host config as my SVN servers runs Subversion over SSL (Which everyone should be doing anyway). Then restart Apache, this will make the change active, it essentially stops the built in DOS protection from blocking your commit. You could always disable this change if you don’t expect large filesizes to affect your SVN repo much and only enable when required. Interestingly check out actions aren’t affected, its seems update/commit get caught
I don’t have server level access
If you don’t have server level access, then you can ask your Administrator to do this change, or another possible solution would be dive into the levels of your SVN repository and split your commits. So rather than doing a commit from the root, go into sub-directories and keep committing small changes, you may able to avoid a 413 error by doing this as you’ll be cutting down the request size to the server