Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Updating from svn repository returns "Could not read chunk size" error

When updating from subversion repository using tortoise svn client I get error looking like that:

Could not read chunk size: An existing connection was forcibly closed by the remote host.

It doesn't prevent me from updating, just interrupts update process, so that I have to repeat update several times, before it is complete.

What can cause such behaviour and how to fix it?

like image 276
Denis Avatar asked Apr 21 '09 14:04

Denis


3 Answers

I was getting the "Could not read chunk size" message from clients on several machines.

The key to figuring it out was this error in the Apache error log:

[Fri May 07 14:26:26 2010] [error] [client 155.35.175.50] Provider encountered an error while streaming a REPORT response.  [500, #0]
[Fri May 07 14:26:26 2010] [error] [client 155.35.175.50] Problem replaying revision  [500, #24]
[Fri May 07 14:26:26 2010] [error] [client 155.35.175.50] Can't open file '/usr/site/svnrep/impc/db/revs/16122': Too many open files  [500, #24]

The Apache process handling the svn operation was running out of file descriptors. On my Ubuntu server, I fixed it by editing /etc/security/limits.conf and adding this at the bottom:

*               hard    nofile          5000
*               soft    nofile          5000

Which increases the file descriptor limit from 1024 to 5000. Then I logged in on a fresh shell and confirmed that the limit got increased via ulimit -n. Then restarted Apache.

like image 151
Lachlan Avatar answered Oct 14 '22 18:10

Lachlan


I just got the 'could not read chunk size' error AND FOUND A SOLUTION -- at least for one scenario.

First, my configuration...

SERVER: CollabNet Subversion Edge Server 2.0.0-2190.74 (Subversion binaries 1.6.17-2190.74) running on Windows Server 2003 32-bit.

CLIENT: TortoiseSVN 1.6.16, Build 21511 - 32-Bit (Subversion 1.6.17) running on Windows XP Pro 32-bit with SP3.

Steps to reproduce...

I got this error after right-click-dragging a versioned subfolder into another versioned subfolder within my local working copy folder and then choosing 'SVN Copy versioned item(s) here' (this is a TortoiseSVN context menu command in Windows Explorer when right-dragging folders). The subfolder contained one ANSI-encoded text file, MANIFEST.MF, which I believe I did not modify (my Subversion configuration does not include a mime type for .MF files). I subsequently committed the newly copied subfolder. Later, anytime I tried to update my Subversion local working copy folders on this PC, I got the chunk size error.

Work-around...

I resolved this by restarting my Subversion/Apache service (which in and of itself did not help and may not have been necessary), then deleting the newly added subfolder from my local working copy folder (it had already made it to the repo, so I wasn't going to lose anything), and THEN performing an Update, which succeeded without the chunk size error and re-fetched the subfolder I just deleted.

In my case, I had copied TWO versioned subfolders this way, and I could not successfully update the root of my local working copy folder until I had deleted BOTH of these new subfolders.

Follow-up...

I assume this is a bug in Subversion server and/or TortoiseSVN client, but I do not have the debugging skills to make that determination. I'll report my findings in the TortoiseSVN Issue Tracker and see where that goes.

like image 11
MikeOnline Avatar answered Oct 14 '22 18:10

MikeOnline


I just had this happen to me, and it was not a server issue; my working copy got corrupted (by me, incidentally).

like image 10
hoffmanc Avatar answered Oct 14 '22 17:10

hoffmanc