Subversion (SVN) error: E120106: ra_serf: The server sent a truncated HTTP response body – Automate the command line workaround with VBScript

SVN error: ra_serf: The server sent a truncated HTTP response body.

While working on a large enterprise project, I’m getting a Subversion (SVN) error “SVN error: ra_serf: The server sent a truncated HTTP response body.” when updating a repository to a network drive.

I found part of the answer on a Stack Overflow post about SVN error: E120106: ra_serf: The server sent a truncated HTTP response body.

This work around assumes the SVN checkout folder is already present provided was a two SVN command line commands.

$ svn cleanup
$ svn up

I ran the SVN command line commands manually for days but still the huge project updates would hang after about 5-10 minutes.

I decided I would try to automate this process a little bit to see if I could run the commands via a script and just repeat the cleanup and update commands every time it hung or stopped until the Subversion (SVN) update process has successfully completed.

Automating the SVN Cleanup and Update Commands in a VBScript.

Below is the script I just wrote today to try and automate the SVN processes.

  • Create Windows Shell
  • Use Shell and Run method calling taskkill command to kill any SVN processes that might be hung.
  • Use Shell and Run SVN with the “cleanup” w/ path argument to identify the SVN Repository folder we are targeting.
  • Use Shell and Run SVN with the update command, “up”, with path to identify the SVN Repository folder we are targeting.

The VBScript Code

Dim oShell : Set Oshell = CreateObject("WScript.Shell")

For i = 1 to 3
    OShell.Run "taskkill /im svn.exe /F", 5, True
    OShell.Run """C:\Program Files\VisualSVN Server\bin\svn.exe"" cleanup H:\Repo\", 1, True
    OShell.Run """C:\Program Files\VisualSVN Server\bin\svn.exe"" up H:\Repo\", 1, True
Next
Set OShell = Nothing

SVN Error: E120106 in a Nutshell

In summary, the SVN error E120106 for truncated HTTP response body is coming from the SVN server.

Everyone on this team has this issue and checkout code repository to their local C drives to checkout and commit work.

I suspect our network is just slow enough to cause a hiccup in communications between HTTP on SVN repository side and Windows file system.

I hope this work around and simple explanation help somebody out there with the same issue. 🙂

~Cyber Abyss

How to Run VBScript, 3 Ways to Run a VBScript?

I’ve been using VBScript for many years. Below, I share the 3 different ways you can run VBScript on a Windows PC including running VBSCript as an Administrator.

3 Methods of Running VBScripts

  1. Run VBSCript in Windows Explorer
  2. Run VBScript from Windows Command Line
  3. Run VBScript as a Windows Administrator

For more VBScript info, try these excellent VBScript resources:

1. Run VBScript in Windows Explorer

  • Locate the VBScript file using Windows Explorer or place a copy on your Desktop
  • Identify VBScript files by the .vbs file extension
VBScript files in Windows Explorer
  • Double click the VBScript file.
  • You may or may not see anything depending on the program design.
  • To check to see if VBScript is running.
  • Run Windows task Keys Ctrl+Shift+Esc then sort by Image Name. Look for “wscript.exe”.
  • To kill a VBScript process, right click over “wscript.exe” and select “end process”.
  • You may see more than one “wscript.exe” on the task manager list as it can be run multiple times and new instances will execute.

2. Run VBScript from Windows Command Line

  • Click Windows Start
  • Open Command Window by Typing “CMD” and hit Enter
CMD exe from Windows Start Menu
  • Enter the full file path at the Command Line and hit Enter

3. Run a VBScript as a Windows Administrator

To run a VBScript as a Windows Admin:

  • Create a Windows Batch File that uses WScript.exe to open the .vbs file (See example below)
  • Run Windows Batch file as Admin and Admin Rights pass thru to the VBScript

Example Windows Batch File

Save the file below with a .cmd file extension. Then right click on it and select “Run as Admin”. Admin rights will be passed on to the VBScript

@echo off
pushd %~dp0
C:\Windows\System32\WScript.exe "My_VBScript.vbs"