HgLabs Existing Repository Import - HTTP Error 400: Bad Request

stephen.dominguez's Avatar

stephen.dominguez

09 Jun, 2017 11:01 PM

Subject says it all -- i have a brand-new evaluation install of HgLabs. Install (even the IIS and SQL prereqs) were fairly well documented and straightforward... Even LDAP authentication to both of the internal corporate domains and users was a breeze. I've created an initial project and team and such, and made a blank repository following the totally easy to follow and well written users manual on the topic. When I go to 'push', I see more or less what i would expect in the console output (searching for changes, bundling, bundling, bundling, then sending.... which always gets to about 245000/4925548 and then aborts with Error 400: Bad Request.

Any ideas? What log files should i be checking for more information? I'd be happy to upload / provide additional details -- just not even sure where to look...

  1. Support Staff 1 Posted by Anton Gogolev on 11 Jun, 2017 06:29 PM

    Anton Gogolev's Avatar

    Stephen,

    This is most likely due to the fact that the payload you are pushing exceeds all allowed limits.

    Let's start with verifying this hypothesis. Does "hg push -r 1" work for you?

  2. 2 Posted by stephen.domingu... on 11 Jun, 2017 07:09 PM

    stephen.dominguez's Avatar

    Ooooooh – it does indeed ☺

    (Thank you for responding over the weekend too!)

    So, assuming a one-by-one push approach works to import my repository history, I could take a piecemeal approach, pushing revisions 2 through……. 10000 (just a guess; our tip is currently something like 35447 or so, so perhaps in thirds would keep things fitting nicely). Then again another hg push –r 10001 through 20000.

    Not totally sure of the exact syntax there, but I think I recall seeing another support question article about that process. … and I’m sure I can google the exact syntax.

    Thoughts?

    ______ ______ ______

    Steve Dominguez
    Team Lead, Seismic Intepretation
    CGG GeoSoftware

    M +01 303 570 1581

  3. Support Staff 3 Posted by Anton Gogolev on 13 Jun, 2017 09:53 AM

    Anton Gogolev's Avatar

    Steve,

    Three workarounds I see.

    1. Just copy the repository over to HgLab Server manually. Take the .hg directory and copy it to HGLAB_HOME_DIRECTORY\repositories\mainline\PROJECT_SLUG\REPOSITORY_NAME, overwriting what's already there
    2. Take the piecemeal approach. To smarten things up, you could try a "bisection" of sorts: if hg push -r 15000 fails, try hg push -r 7500, hg push -r 3200, etc.
    3. Tune IIS to allow for larger POST payloads (this is done in Web.config):
    <system.web>
        <httpRuntime
            enableVersionHeader="false" 
            executionTimeout="3600" 
            maxRequestLength="2097152" 
            maxUrlLength="8192" 
            maxQueryStringLength="8192" />
        </httpRuntime>
    </system.web>
    <system.webServer>
        <security>
            <requestFiltering allowDoubleEscaping="true">
                <requestLimits maxQueryString="8192" maxAllowedContentLength="2147483648" />
            </requestFiltering>
        </security>
    </system.webServer>
    
  4. 4 Posted by stephen.domingu... on 13 Jun, 2017 01:51 PM

    stephen.dominguez's Avatar

    Absolutely correct – in fact, all three approaches seem to work just fine!

    Had a little bit of trouble figuring out where to drop the .hg directory at first, but I tracked it down…

    The piecemeal approach worked perfectly well also until I encountered our rev#27839 which was a single rev too large to push… at which point item 3 worked perfectly as well.

    I’ll be submitting a next support ticket regarding ‘subrepo’ support… but that’s a separate issue, so we can surely mark this one as closed!

    Thanks for all the attention and help!

    ______ ______ ______

    Steve Dominguez
    Team Lead – Seismic Interpretation Software
    P +01 832 351 5626
    M +01 303 570 1581

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Jan, 2025 05:02 PM
13 Jan, 2025 10:42 AM
29 Nov, 2024 10:00 AM
12 Jan, 2023 12:25 PM
10 Jan, 2023 04:49 PM