Welcome Guest! To enable all features please Login or Register.



System.OutOfMemory Exception
#1 Posted : Friday, February 24, 2012 7:47:59 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/14/2011(UTC)
Posts: 6
Location: Canada

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)

I use NCrunch every day and still happy with it.
But since this morning, I've been getting this error in the Processing Queue which totally stop the tool from working.

[14:29:49.1602-BuildTask-37] ERROR (Internal): System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.String.Concat(String str0, String str1)
at nCrunch.Common.CommonLogger.#=qOPkGPRKDEttWll5KZu5QRw==(LogVerbosity #=q$v0B6vI47FcaG6u_R$oEkg==, String #=qTGKrr7u31o6F3Dx_KC6x4g==)
at nCrunch.Common.CommonLogger.LogBareLine(LogVerbosity verbosity, String line)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents)
at nCrunch.Core.BuildTask.DoProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.ProcessingTask.ProcessTaskAndReturnSuccessFlag()
at nCrunch.Core.Processing.ProcessingQueue.#=qElODe1hhViN21mEUKI$Fwg==(ProcessingTask #=qso0hS7WMwjN7sUci4m5Xrw==)

I have 4gb of RAM with Windows XP. From what I see in this stacktrace, it looks like there is some HEAVY string concat going on during the logging process. Any idea on how I could fix/bypass this problem?.

I have to say we are working on a pretty large solution, with thousands of tests covering many libraries, but it was working fine until this morning. We did installed some new tools recently, like Resharper, which adds to the memory usage.
#2 Posted : Friday, February 24, 2012 9:05:21 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,045

Thanks: 941 times
Was thanked: 1265 time(s) in 1177 post(s)

The stack trace above indicates an exception thrown while logging data from the build process. Logging of build output is a normal operation and I think it's more likely to be the piece of straw that's broken the camels back as far as your memory usage is concerned.

There are a few things you can do to reduce NCrunch's memory footprint:

1. Check that you don't have tests that are writing large amounts of console/trace information at runtime. NCrunch stores all this data (you can see it in the tests window when you click on a test), and it is kept in memory. If you have tests that are dumping huge amounts of data out, I'd suggest rewiring or ignoring them.

2. Try reducing the 'process pool size' NCrunch global configuration option to a lower number (1 or 2 will do). This will slow down the engine but will cause it to spawn less task runner .exes in the background, thus freeing up more memory.

3. If you have parallel execution enabled, try turning down the 'Max number of processing threads' global configuration option. When turned down in combination with the above setting, NCrunch will require less resources as it will do less work in parallel.

I'm keen to hear if any of the above helps you out!


#3 Posted : Wednesday, February 29, 2012 7:29:03 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 12/14/2011(UTC)
Posts: 6
Location: Canada

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Thanks Remco,

I've tried your suggestions but I still had some problems so I deactivated Resharper and it fixed the problem. We're working with virtualized remote desktops and I guess the usage of these 2 heavy memory consuming tools at once is triggering memory allocation issues on the server.

Sorry for the inconveniences, but thanks for the usual quick answer!

1 user thanked mfjerome for this useful post.
Remco on 2/29/2012(UTC)
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.045 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download