Ticket #390 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Subversion: Problems Committing Files larger than 4MB

Reported by: kmaclean Owned by: kmaclean
Priority: major Milestone: WebSite 0.2.1
Component: Web Site Version: Website 0.2
Keywords: Cc:

Description (last modified by kmaclean) (diff)

Message from nsh:

I rebuilt German model but can't commit it:

svn: PUT of '/svn/de/!
svn/wrk/45d098f9-b570-4110-8989-5f9dd41009b0/Trunk/AcousticModels/model_parameters/voxforge_de_sphinx.cd_cont_3000/means': 500 Internal Server Error (http://www.dev.voxforge.org)

Do you have an idea what's going on?

My reply:

Hi Nickolay,

I just tried it with my password over mod_dav_svn over Apache and it seems to work... but success in accessing locally vs over the Internet doesn't mean their isn't a problem.

I checked the svn authority files, and you have rw authority on the German repository.

I'll stop and restart the svn server ... sometimes the crawlers can slow things down and cause weird errors. This error log kind of points to something slowing the server down, and causing problems:

[Thu May 29 03:16:38 2008] [error] [client 192.168.0.107] Could not get next bucket brigade  [500, #0]
[Thu May 29 03:36:44 2008] [error] [client 192.168.0.107] Unable to PUT new contents for /svn/de/!svn/wrk/4cb95b2e-d669-4f3c-99dc-9c4fd88495de/Trunk/AcousticModels/etc/voxforge_de_sphinx.lm.  [403, #0]
[Thu May 29 03:36:44 2008] [error] [client 192.168.0.107] Could not prepare to write the file  [500, #160012]
[Thu May 29 03:36:44 2008] [error] [client 192.168.0.107] Cannot write to the prototype revision file of transaction '3475-1' because a previous representation is currently being written by this process  [500, #160012]
[Thu May 29 03:40:29 2008] [error] [client 192.168.0.107] Unable to PUT new contents for /svn/de/!svn/wrk/a6369864-7adc-4a19-9f61-034b5341c765/Trunk/AcousticModels/espeak2phones.pl.  [403, #0]
[Thu May 29 03:40:29 2008] [error] [client 192.168.0.107] Could not prepare to write the file  [500, #160012]
[Thu May 29 03:40:29 2008] [error] [client 192.168.0.107] Cannot write to the prototype revision file of transaction '3475-1' because a previous representation is currently being written by this process  [500, #160012]

Can you commit to the Russian repository?

Ken

More info from nsh:

I can commit small files, and can't commit 'means' (4Mb size). It really looks like a bug on the server.

Change History

comment:1 Changed 12 years ago by kmaclean

From this web page:

Limiting the size of an XML Body

If you're running mod_dav (typically used with subversion) then you may want to limit the max size of an XML request body. The LimitXMLRequestBody directive is only available on Apache 2, and its default value is 1 million bytes (approx 1mb). Many tutorials will have you set this value to 0 which means files of any size may be uploaded, which may be necessary if you're using WebDAV to upload large files, but if you're simply using it for source control, you can probably get away with setting an upper bound, such as 10mb:

LimitXMLRequestBody 10485760

However, the HTTPD docs say this:

 Description:	Restricts the total size of the HTTP request body sent from the client
  Syntax:	!LimitRequestBody bytes
  Default:	!LimitRequestBody 0
  Context:	server config, virtual host, directory, .htaccess
  Override:	All
  Status:	Core
  Module:	core

This directive specifies the number of bytes from 0 (meaning unlimited) to 2147483647 (2GB) that are allowed in a request body.

comment:2 Changed 12 years ago by kmaclean

from this web page:

Limiting large requests

Apache has several directives that allow you to limit the size of a request, this can also be useful for mitigating the effects of a denial of service attack.

A good place to start is the LimitRequestBody directive. This directive is set to unlimited by default. If you are allowing file uploads of no larger than 1MB, you could set this setting to something like:

LimitRequestBody 1048576

If you're not allowing file uploads you can set it even smaller.

Some other directives to look at are LimitRequestFields, LimitRequestFieldSize and LimitRequestLine. These directives are set to a reasonable defaults for most servers, but you may want to tweak them to best fit your needs. See the documentation for more info.

Limiting the size of an XML Body

If you're running mod_dav (typically used with subversion) then you may want to limit the max size of an XML request body. The !LimitXMLRequestBody directive is only available on Apache 2, and its default value is 1 million bytes (approx 1mb). Many tutorials will have you set this value to 0 which means files of any size may be uploaded, which may be necessary if you're using WebDAV to upload large files, but if you're simply using it for source control, you can probably get away with setting an upper bound, such as 10mb:

!LimitXMLRequestBody 10485760

comment:3 Changed 12 years ago by kmaclean

From the Apache manual

LimitXMLRequestBody Directive
Description:	Limits the size of an XML-based request body
Syntax:	LimitXMLRequestBody bytes
Default:	LimitXMLRequestBody 1000000
Context:	server config, virtual host, directory, .htaccess
Override:	All
Status:	Core
Module:	core

Limit (in bytes) on maximum size of an XML-based request body. A value of 0 will disable any checking.

Example:

LimitXMLRequestBody 0

comment:4 Changed 12 years ago by kmaclean

  • Description modified (diff)

comment:5 Changed 12 years ago by kmaclean

  • Status changed from new to closed
  • Resolution set to fixed

changed LimitXMLRequestBody to 20971520 (20meg) in /etc/httpd/conf/http.conf; works OK now ...

comment:6 Changed 12 years ago by kmaclean

My message to nsh:

I think I fixed the problem: Apache needed the LimitXMLRequestBody Directive limit to be increased - see ticket #390 for details. It is now at 20 meg.

This seems to only apply to text uploads (code, text AMs, ...), since I think you have uploaded wav files that are greater than 1 meg in the past (and I think these are handled by the LimitRequestBody? directive - which allows unlimited uploads).

I also uploaded the files using Apache, so it tests OK now ...

I use svnserve locally, so I never encountered this problem.

Ken

Note: See TracTickets for help on using tickets.