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?
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.