Updating from svn repository returns “Could not re

2019-01-13 19:39发布

问题:

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?

回答1:

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.



回答2:

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.



回答3:

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



回答4:

The problem and (some other) disappeared after turning off client-side antivirus.

I'm using Ubuntu server with subversion 1.7.4 via Apache.



回答5:

Check the apache error log, there should be an error logged in there with an error number. That number will help finding out why the connection was dropped.

If there's nothing in the error log, check your virus scanner/firewall settings: some of those tools will drop a connection if they think the transferred data is dangerous.



回答6:

For us the problem was an a timeout on Apache. The update was taking about 15 minutes, but Apache timed out after 10 minutes, causing our SVN server to give the error you see. The final solution was to increase the timeout setting for Apache. We use VisualSVN server - for detailed instructions on how to change this setting, look here: http://adventuresindotnet.blogspot.com/2010/09/svn-trouble.html



回答7:

I changed to an Ubuntu server and we had this same error - across multiple client PC's, OS's, and client versions.

After making sure that both the file limit settings and Apache timeout settings were as suggested.

(See http://posidev.com/blog/2009/06/04/set-ulimit-parameters-on-ubuntu/ )

I eventually solved the problem by using the apache2-mpm-prefork package rather than the apache2-mpm-worker package.



回答8:

I was getting this same error message on updates after I renamed a folder and committed. I created a new working directory and didn't receive the error. So, I just moved my changes to the new working directory, committed and blew away the old directory.

So, this error seemed to be caused by my local directory getting corrupted.



回答9:

I get that also. Our server is Apache running on Windows. My client is connected with a high speed but somewhat high latency (200ms.) The other part of the puzzle is that I am running windows Vista. Turning autoscaling and rss seems to improve the situation, but does not fix it.



回答10:

There is another annoying cause for this error message. It could be your router or your router's firmware.

I had recently upgraded my Linksys WRT110's firmware from version 1.0.02 to 1.0.07 and after that, subversion could no longer add new files to the repository. It could only update existing files. Rolling back to 1.0.02 fixed the problem.

Sources:

  • http://blog.wouldbetheologian.com/2008/12/warning-on-linksys-wrt110-firmware.html
  • http://homecommunity.cisco.com/t5/Wireless-Routers/Upgraded-WRT-110N-to-1-0-07-and-now-Subversion-won-t-work/td-p/321812

Basically, anytime the connection is abruptly dropped, you're going to get this error. Could be a configuration error on Apache, like many of you stated. It could also be due to a slow server or overloaded connection, or it could be due to a cheap router, as was in my case.



回答11:

This clearly has many causes, but for me this was fixed by restarting my SVN server (VisualSVNServer 2.5.1). This occurs frequently when doing a full repo checkout on a newly loaded dump.



回答12:

For us, the workaround was to downgrade the SVN client from 1.8 to 1.7 (command line client that's bundled with TortoiseSVN).



回答13:

VisualSVN 2.5.8: Had the same error, next steps helped me to fix this error:

On the server:

  1. Deleted on the server problematic folder;
  2. Restart VisualSVN server.

On Workstation:

  1. Update parent folder ;
  2. Add folder and files again ;
  3. Add to SVN ;
  4. Commit.