Mercurial client error 255 and HTTP error 404 when attempting to push large files to server

前端 未结 4 999
不知归路
不知归路 2020-12-23 11:50

Problem:

19/06/10 Update: More evidence problem is server-side. Receiving this error on Windows 7 command line (see below for full traceback):

URLE         


        
相关标签:
4条回答
  • 2020-12-23 12:36

    Ok, your solution did it!
    I already had a requestLimits tag like this:
    <requestLimits maxUrl="16384" maxQueryString="65536" />
    so I added maxAllowedContentLength ="524288000" to it like this:
    <requestLimits maxUrl="16384" maxQueryString="65536" maxAllowedContentLength ="524288000" />
    And that did it!

    0 讨论(0)
  • 2020-12-23 12:38

    I'm just posting this for anyone else coming into this thread from a search.

    There's currently an issue using the largefiles extension in the mercurial python module when hosted via IIS. See this post if you're encountering issues pushing large changesets (or large files) to IIS via TortoiseHg.

    The problem ultimlately turns out to be a bug in SSL processing introduced Python 2.7.3 (probably explaining why there are so many unresolved posts of people looking for problems with Mercurial). Rolling back to Python 2.7.2 let me get a little further ahead (blocked at 30Mb pushes instead of 15Mb), but to properly solve the problem I had to install the IISCrypto utility to completely disable transfers over SSLv2.

    0 讨论(0)
  • 2020-12-23 12:41

    Had the same issue using IIS 7 as server. Tried the solution above which resolved the error 255 issue, but still got Errorno 10054 with larger files. I then increased the Connection Time-out in IIS which worked.

    To change: Web Site -> Manage Web Site -> Advanced Settings -> Connection Limits -> Connection Time-out. The default is 2 minutes. Changed mine to 20 minutes and it worked.

    Not sure why this works but seems that Mercurial makes a connection to the server, takes a while to process larger files, then only sends a request. By that time IIS has disconnected the client.

    0 讨论(0)
  • 2020-12-23 12:42

    Went through the same pain points...

    With the default settings on the IIS server, you will not be able to push large repositories to the server, as IIS has a default maximum request length of only 4 MB, and a timeout for CGI scripts of 15 min, making it impossible to upload large files. To enable the uploading of large files (and this is not easy to find on the web…), do the following:
    1. In IIS Manager, click on the web site node, and click the Limits… link.
    2. Then specify a connection time-out sufficiently large (I chose 1 hour here, or 3600 seconds)
    3. Next, click the node containing hg (as per the installation procedure), then double-click CGI
    4. Specify a sufficiently-long time out for CGI scripts (e.g., 10 hours)

    Now, edit C:\inetpub\wwwroot\hg\web.config, so that it has a new <security> section under <system.webserver>, and a <httpRuntime> specification under <system.web>:

    <?xml version="1.0" encoding="UTF-8"?>
    <configuration>
      <system.webServer>
    […]
        <security>
             <requestFiltering>
               <requestLimits maxAllowedContentLength ="2147482624" />
          </requestFiltering>
        </security>
      </system.webServer>
      <system.web>
        <httpRuntime
          executionTimeout="540000" maxRequestLength="2097151"/>
      </system.web>
    </configuration>
    

    This specifies an http timeout of a bit more than 6 days, and a maximum upload limit of about 2 GB.

    0 讨论(0)
提交回复
热议问题