Mercurial Crashing: Out of Memory

Jensen, Aaron ajensen at webmd.net
Thu Sep 27 17:53:41 UTC 2012


We have a Mercurial repository with some large database files (greater than 128MB in size).  We are running Mercurial 2.3.1 with TortoiseHg 2.5 on Windows 2008 with 4GB of RAM.  Recently, Mercurial has started crashing with out of memory errors when updating this repository.  When I watch memory usage during the update, I see the hg.exe quickly balloon up to almost 3 GB of memory before crashing.  When I run update with the --debug flag, this is what I just before the crash:

	updating: Common/AdmSiteAssociations.bcp 5/102 files (4.90%)
	getting Common/AdmSiteAssociations.bcp
	hg.exe : abort: out of memory

This file is 192 MB in this .hg\store\data directory, and 267 MB in the working directory.

I know the obvious solution is not to store files this big in Mercurial.  Unfortunately, getting new processes and procedures in place for managing our data will take a few months, and we need to be able to update our repositories ASAP.

Is this expected behavior?  Are my files too big?  If so, what is the limiting factor?  The internal size?  Or the working directory size?  Is there a way I can help figure out where Mercurial is using memory and make things better?  Is there anything I can do to get my repository updated, short of installing extra RAM?


     <:> Aaron





More information about the Mercurial mailing list