Question: I've set up a Mercurial server on a Windows 2003 / IIS 6 machine and when I try to pull the repository I get the following sequence

```
requesting all changes
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: premature EOF reading chunk (got 91303 bytes, expected 1542634)

```

I've tried pretty much everything I can think of, but with no success. I followed the steps of [Jeremy Skinners](http://www.jeremyskinner.co.uk/mercurial-on-iis7/) guide on doing it for IIS7, but on an IIS6 server.

I found a [post](http://webnull.galbitz.com/post/334440927/installing-mercurial-hgwebdir-cgi-on-windows-2003) where the author was experiencing the same issue, but was unable to find a solution.

So far it looks like the solution is to migrate to Apache or upgrade to Windows 2008/II7 .. but if someone knows how to solve this, please let me know

Answer: 
I'll answer this one myself.

The problem turned out to be that there is a CGI script timeout of 5 minutes in IIS 6 (and below, not sure about 7) and this was what kept being hit. To change the timeout value you have to have the [IIS 6 Resource Kit](http://www.microsoft.com/downloads/details.aspx?FamilyID=56FC92EE-A71A-4C73-B628-ADE629C89499&displaylang=en) installed.

Once installed, start the **MetaBase Explorer** utility and navigate to \LM\W3SVC and locate the **CGITimeout** entry and change the value from the default 300 (5 minutes) to a higher value (I ended up using 20 minutes).

After changing the value I restarted IIS to make sure it was used by the server. Once this has been done, everything worked like a charm!

Cross posted on my [blog](http://www.thecodejunkie.com/2010/03/avoiding-aborted-transactions-when.html)
Have you checked out [Joel's tutorial](http://hginit.com/)? Maybe you'll find the answer there.