History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CCNET-955
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Craig Sutherland
Reporter: Martina Oefelein
Votes: 2
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
CruiseControl .NET

buildLogBuildPlugin: System.OutOfMemoryException on medium-size builds due to NCover reports

Created: 06/Aug/07 06:02 AM   Updated: 25/Jul/10 12:48 PM
Component/s: Dashboard
Affects Version/s: 1.3
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Issue Links:
Relationship
This issue Relates to:
CCNET-819 System.OutOfMemoryException happens w... Major Open
This issue Relates to:
CCNET-1659 Crash when log file is big Critical Closed


 Description  « Hide
With a build log of about 34MiB size, click on "View Build log" causes a System.OutOfMemoryException:

Exception Message

Eine Ausnahme vom Typ System.OutOfMemoryException wurde ausgelöst.
Exception Full Details

System.OutOfMemoryException: Eine Ausnahme vom Typ System.OutOfMemoryException wurde ausgelöst. bei System.String.Replace(String oldValue, String newValue) bei ThoughtWorks.CruiseControl.WebDashboard.Plugins.BuildReport.HtmlBuildLogAction.Execute(ICruiseRequest cruiseRequest) bei ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ServerCheckingProxyAction.Execute(ICruiseRequest cruiseRequest) bei ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.BuildCheckingProxyAction.Execute(ICruiseRequest cruiseRequest) bei ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ProjectCheckingProxyAction.Execute(ICruiseRequest cruiseRequest) bei ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CruiseActionProxyAction.Execute(IRequest request) bei ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.CachingActionProxy.Execute(IRequest request) bei ThoughtWorks.CruiseControl.WebDashboard.MVC.Cruise.ExceptionCatchingActionProxy.Execute(IRequest request)

We got build logs of this size after about 6 months of development (about 20 developers), so I don't think that our build is exceptionally large.
We are using the MSBuild task. I already tried to use the MSBuild parameter /verbosity:quiet, but this didn't reduce the size of hte log file.

Proposed resolutions:
- Reduce the output of the MSBuild logger (this will also benefit performance)
- Stream the log file instead of loading / manipulating it in memory.


 All   Comments   Work Log   Change History      Sort Order:
Martina Oefelein [03/Sep/07 08:51 AM]
Meanwhile, the log file has over 50 MiB. The major part of this are the NCover logs. Maybe it would be possible to handle these separately? I.e. do not include them in the master log file. Maybe generate a small summary log for inclusion in the main log, that can be used by the reports?

Riccardo Munisso [11/Apr/08 11:01 AM]
In the HtmlBuildLogAction.Execute maybe it's better replace the two calls to string.Replace with StringBuilder.Replace to reduce memory allocations.

With a 65MB log we have the same issue.

Craig Sutherland [06/Jan/10 08:30 PM]
We have made some changes to reduce the memory usage within both the dashboard and the server. However it still manipulates strings within memory, so large build files will still cause issues.

There is an experimental branch to use streams instead of strings for a future release of CC.NET.

Craig Sutherland [11/Jan/10 03:21 AM]
Marking this issue aas resolved since it is a duplicate of CCNET-819 (CCNET-819 has additional details).