exceptionSystem.OutOfMemoryException

Kevin's Avatar

Kevin

05 Feb, 2015 03:14 PM

Recently we've noticed issues when we try to do a full clone of our repository. Finally tracked down the error in the hgsharp error log. Every time we have the issue pulling, 2 errors are recorded back to back. We had RAM added to the VM that this is running on, but the error still occurs.

Running: 1.7.7 Enterprise

Any recommendations on how to resolve this?

08:13:07.7343 - Error - - HgSharp.Server.HgHttpServer - exceptionSystem.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.IO.MemoryStream.set_Capacity(Int32 value)
   at System.IO.MemoryStream.EnsureCapacity(Int32 value)
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Ionic.Zlib.ZlibBaseStream.finish() in c:\DotNetZip\Zlib\ZlibBaseStream.cs:line 200
   at Ionic.Zlib.ZlibBaseStream.Close() in c:\DotNetZip\Zlib\ZlibBaseStream.cs:line 307
   at Ionic.Zlib.ZlibStream.Dispose(Boolean disposing) in c:\DotNetZip\Zlib\ZlibStream.cs:line 419
   at System.IO.Stream.Close()
   at System.IO.Stream.Dispose()
   at HgSharp.Core.HgRevlogReader.Decompress(Byte[] buffer, Int32 offset, Int32 count) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogReader.cs:line 248
   at HgSharp.Core.HgRevlogReader.ReadRevlogEntryData(HgRevlogEntry revlogEntry, Byte[] buffer, Int32& dataOffset) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogReader.cs:line 213
   at HgSharp.Core.HgRevlogReader.ReadRevlogEntryDataRaw(UInt32 revision) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogReader.cs:line 393
   at HgSharp.Core.HgBundleBuilder.<BuildBundleGroup>d__25.MoveNext() in d:\projects\hgsharp\src\HgSharp.Core\HgBundleBuilder.cs:line 157
   at HgSharp.Core.HgBundleWriter.WriteBundle(HgBundle hgBundle, Stream stream, HgBundleFormat format, HgBundleCompression compression) in d:\projects\hgsharp\src\HgSharp.Core\HgBundleWriter.cs:line 64
   at HgSharp.Server.HgHttpServer.ExecuteGetBundle(NameValueCollection args) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 279
   at HgSharp.Server.HgHttpServer.<>c__DisplayClass2`1.<Args>b__1(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 84
   at HgSharp.Server.HgHttpServer.<>c__DisplayClass8.<ReadCommand>b__7(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 135
   at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 144 at System.IO.MemoryStream.set_Capacity(Int32 value)
   at System.IO.MemoryStream.EnsureCapacity(Int32 value)
   at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
   at Ionic.Zlib.ZlibBaseStream.finish() in c:\DotNetZip\Zlib\ZlibBaseStream.cs:line 200
   at Ionic.Zlib.ZlibBaseStream.Close() in c:\DotNetZip\Zlib\ZlibBaseStream.cs:line 307
   at Ionic.Zlib.ZlibStream.Dispose(Boolean disposing) in c:\DotNetZip\Zlib\ZlibStream.cs:line 419
   at System.IO.Stream.Close()
   at System.IO.Stream.Dispose()
   at HgSharp.Core.HgRevlogReader.Decompress(Byte[] buffer, Int32 offset, Int32 count) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogReader.cs:line 248
   at HgSharp.Core.HgRevlogReader.ReadRevlogEntryData(HgRevlogEntry revlogEntry, Byte[] buffer, Int32& dataOffset) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogReader.cs:line 213
   at HgSharp.Core.HgRevlogReader.ReadRevlogEntryDataRaw(UInt32 revision) in d:\projects\hgsharp\src\HgSharp.Core\HgRevlogReader.cs:line 393
   at HgSharp.Core.HgBundleBuilder.<BuildBundleGroup>d__25.MoveNext() in d:\projects\hgsharp\src\HgSharp.Core\HgBundleBuilder.cs:line 157
   at HgSharp.Core.HgBundleWriter.WriteBundle(HgBundle hgBundle, Stream stream, HgBundleFormat format, HgBundleCompression compression) in d:\projects\hgsharp\src\HgSharp.Core\HgBundleWriter.cs:line 64
   at HgSharp.Server.HgHttpServer.ExecuteGetBundle(NameValueCollection args) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 279
   at HgSharp.Server.HgHttpServer.<>c__DisplayClass2`1.<Args>b__1(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 84
   at HgSharp.Server.HgHttpServer.<>c__DisplayClass8.<ReadCommand>b__7(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 135
   at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 144
08:13:07.7343 - Error - - HgSharp.Server.HgHttpServer - exceptionSystem.Web.HttpException (0x80004005): Server cannot set status after HTTP headers have been sent.
   at System.Web.HttpResponse.set_StatusCode(Int32 value)
   at HgSharp.Server.HgHttpServer.ReportException(Exception e, HttpStatusCode statusCode, String response) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 163
   at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 152
   at HgSharp.Server.HgHttpServer.ExecuteCommand(HgHttpCommandContext context, String command) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 207 at System.Web.HttpResponse.set_StatusCode(Int32 value)
   at HgSharp.Server.HgHttpServer.ReportException(Exception e, HttpStatusCode statusCode, String response) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 163
   at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 152
   at HgSharp.Server.HgHttpServer.ExecuteCommand(HgHttpCommandContext context, String command) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 207

  1. Support Staff 1 Posted by Anton Gogolev on 05 Feb, 2015 04:55 PM

    Anton Gogolev's Avatar

    Hello, Kevin!

    Will try to fix this ASAP. Meanwhile, you can turn on LAN Optimizations (
    https://hglabhq.com/documentation/administrator-guide/repositories ) to
    speed up full clones.

  2. 2 Posted by Kevin on 05 Feb, 2015 05:39 PM

    Kevin's Avatar

    I'll give that a shot, thanks!

  3. 3 Posted by craig on 25 Mar, 2015 02:00 AM

    craig's Avatar

    To fix memory issues with HgLab, change the Application Pool to disable 32-bit support. I just wasted half a day figuring this out...hopefully you won't have to!

  4. Support Staff 4 Posted by Anton Gogolev on 27 Mar, 2015 06:29 AM

    Anton Gogolev's Avatar

    Craig,

    Thanks a lot! Will update the installer accordingly.

  5. Anton Gogolev closed this discussion on 27 Mar, 2015 06:29 AM.

Comments are currently closed for this discussion. You can start a new one.

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

03 Aug, 2022 01:49 PM
05 Jul, 2022 07:01 PM
28 Mar, 2022 04:42 PM
21 Jan, 2022 10:43 AM
20 Jan, 2022 10:45 AM

 

18 Jan, 2022 10:15 AM
19 Mar, 2021 06:13 PM
01 Mar, 2021 02:51 PM
01 Jan, 2021 02:19 AM
28 Aug, 2020 08:34 AM
23 Jun, 2020 08:29 AM