views:

330

answers:

3

Hi,

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 guide on doing it for IIS7, but on an IIS6 server.

I found a post 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

A: 

Have you checked out Joel's tutorial? Maybe you'll find the answer there.

z-boss
Nothing about IIS hosting in there, or have I just missed it?
TheCodeJunkie
+2  A: 

I haven't tried it yet, but there's this: Running Mercurial on Windows

If you scroll down to the "Windows Server 2003/XP" section, I think that should cover you for IIS 6.

Andy S
+4  A: 

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

TheCodeJunkie
Awesome! I thought I'd corrupted something when move the repos! Good save
Mr AH
Thanks for posting the answer. This was causing us problems too. A full clone worked sometimes (fast connection) but failed other times (slow connection). It isn't strictly necessary to install the IIS 6 Resource Kit. It is sufficient to check the "Enable Direct Metabase Edit" (in the IIS Manager properties dialog), then directly edit the XML Metabase.xml file (found in the directory "\WINDOWS\system32\inetsrv") to change the value of the "CGITimeout" setting. Of course, the metabase explorer is probably more convenient if you need to make other changes.
Stephen C. Steel