Svn – VisualSVN Server 2.5.2 reports “413 Request Entity Too Large” when attempting to commit multigigabyte files

apache-1.3svnvisualsvn-server

I'm getting the following error, when attempting to commit large files (multi-gigabyte) to a new local installation of VisualSVN 2.5.2 Server on a Windows XP machine.

"413 Request Entity Too Large"

I'm using Windows authentication, and I've already added the following settings (and then restarted the server) to httpd-custom.conf:

LimitXMLRequestBody 0
LimitRequestBody 0

If it matters, I'm using TortoiseSVN as a client.

Is there something else that needs to be done to get VisualSVN Server to accept large files?

Update:

Contents of the SVNServer Event Viewer:

1/13/2012 3:31:45 PM VisualSVN Server 2.5 Error Apache 1001 CORP\sam.johnson IOMFOX0960L Could not get next bucket brigade [500, #0] [client 10.155.60.53]
1/13/2012 3:31:45 PM VisualSVN Server 2.5 Error Apache 1001 CORP\sam.johnson IOMFOX0960L Invalid Content-Length [client 10.155.60.53]

Best Answer

You're hitting an error on this chunk of validation code, in http_filters.c:

/* Protects against over/underflow, non-digit chars in the
 * string (excluding leading space) (the endstr checks)
 * and a negative number. */
if (apr_strtoff(&ctx->remaining, lenp, &endstr, 10)
    || endstr == lenp || *endstr || ctx->remaining < 0) {

    ctx->remaining = 0;
    ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
      "Invalid Content-Length");

    return bail_out_on_error(ctx, f, HTTP_REQUEST_ENTITY_TOO_LARGE);
}

So, your removal of the request body limit was successful. It looks like the client is at fault; Tortoise seems to be be sending invalid data in the Content-Length header. Is there any way that you can capture the full HTTP request (it'll need to be unencrypted http, and you'll need a capture tool like wireshark) to inspect what it's sending in that header?