SVN Trouble

(If all you want to do is solve the same problem, you only need to add a Timeout 1800 line to your c:\program files\visualsvn server\conf\httpd-custom.conf file and restart Visual SVN server - you can, of course, adjust the number of seconds as you like)

First off, if you are doing any kind of software development and you aren’t using source control of some kind, you are missing out big time. I highly recommend source control. I use Visual SVN for the server and Smart SVN for the client, but there are lots of other great options out there. OK, on to the good stuff.

We have purchased licenses for RedGate’s SQL Source Control, which allows you to use SQL Manager to check in SQL objects into a SVN repository. Very cool. I had been using this for a short while, and I soon saw this error when trying to scan for changes:

Could not read chunk Size: secure connection truncated

It mentioned a ‘secure connection’, and so I figured that SSL could be an issue. I set up VisualSVN to listen on both ports 443 (with SSL) and 80 (without SSL) by adding the following to c:\program files\visualsvn server\conf\httpd-custom.conf and then restarting VisualSVN server:

```asciidoc
Listen “80”
SSLEngine off

1

But I still saw chunking errors like this:
> <span style="font-family: courier new;">Could not read chunk size</span>

What in the world is a chunking error? I tried Google, but all that turned up there was a [not-so-useful discussion](http://www.weask.us/entry/updating-svn-repository-returns-ldquo-read-chunk-size-rdquo-error).

I figured I'd dig deeper, so I turned on errors in apache by adding the following to <span style="font-family: courier new;">c:\program files\visualsvn server\conf\httpd-custom.conf</span> and restarting VisualSVN: (I had to create the <span style="font-family: courier new;">c:\errorlogs</span> folder to get this to work)

```asciidoc
ErrorLog c:/errorlogs/visualsvn_apache.log
LogLevel warn

I then saw this in the apache log:

1
2
3
[Tue Sep 07 23:05:16 2010] [error] [client 192.168.3.33] Provider encountered an error while streaming a REPORT response. [500, #0]
[Tue Sep 07 23:05:16 2010] [error] [client 192.168.3.33] A failure occurred while driving the update report editor [500, #620018]
[Tue Sep 07 23:05:16 2010] [error] [client 192.168.3.33] Error writing base64 data: APR does not understand this error code [500, #620018]

That finally gave me a little better error message to search for. After much more googling, I found 3 possible problems:

I first tried the VMWare NAT issue. I removed all possible NAT problems by running the SVN client on the same box as the SVN server, but the problem didn’t go away. The Timeout issue was the next easiest one to try.

To address the timeout issue, I increased the timeout in the apache config to 30 minutes by adding this line to c:\program files\visualsvn server\conf\httpd-custom.conf and restarting VisualSVN:

1
Timeout 1800

And that fixed the problem. The scan of our database / SVN server was taking about 15 minutes (tons of tables and stored procedures, with the scan running on a somewhat slow development server). However, the Apache timeout was set to around 10 minutes. So after 10 minutes, Apache gave up, which caused the chunking error, which then caused the client software to throw the error.

Please let me know in the comments if you have run into similar problems, or if I need to clarify this at all.