EPIC FAIL: System.OutOfMemoryException: Out of memory

Any ideas how to TS this?

Task Error: System.AggregateException: One or more errors occurred —> System.OutOfMemoryException: Out of memory
at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int)
at System.IO.FileStream.InitBuffer (Int32 size, Boolean isZeroSize) [0x00000] in :0
at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0
at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
at NLog.Internal.FileAppenders.BaseFileAppender.TryCreateFileStream (Boolean allowConcurrentWrite) [0x00000] in :0
at NLog.Internal.FileAppenders.BaseFileAppender.CreateFileStream (Boolean allowConcurrentWrite) [0x00000] in :0
at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write (System.Byte[] bytes) [0x00000] in :0
at NLog.Targets.FileTarget.WriteToFile (System.String fileName, System.Byte[] bytes, Boolean justData) [0x00000] in :0
at NLog.Targets.FileTarget.Write (NLog.LogEventInfo logEvent) [0x00000] in :0
at NLog.Targets.Target.Write (AsyncLogEventInfo logEvent) [0x00000] in :0
— End of inner exception stack trace —
–> (Inner exception 0) System.OutOfMemoryException: Out of memory
at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int)
at System.IO.FileStream.InitBuffer (Int32 size, Boolean isZeroSize) [0x00000] in :0
at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0
at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
at NLog.Internal.FileAppenders.BaseFileAppender.TryCreateFileStream (Boolean allowConcurrentWrite) [0x00000] in :0
at NLog.Internal.FileAppenders.BaseFileAppender.CreateFileStream (Boolean allowConcurrentWrite) [0x00000] in :0
at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write (System.Byte[] bytes) [0x00000] in :0
at NLog.Targets.FileTarget.WriteToFile (System.String fileName, System.Byte[] bytes, Boolean justData) [0x00000] in :0
at NLog.Targets.FileTarget.Write (NLog.LogEventInfo logEvent) [0x00000] in :0
at NLog.Targets.Target.Write (AsyncLogEventInfo logEvent) [0x00000] in :0

EPIC FAIL: System.OutOfMemoryException: Out of memory
at (wrapper managed-to-native) object:__icall_wrapper_mono_array_new_specific (intptr,int)
at System.IO.FileStream.InitBuffer (Int32 size, Boolean isZeroSize) [0x00000] in :0
at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0
at System.IO.FileStream…ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) [0x00000] in :0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int)
at NLog.Internal.FileAppenders.BaseFileAppender.TryCreateFileStream (Boolean allowConcurrentWrite) [0x00000] in :0
at NLog.Internal.FileAppenders.BaseFileAppender.CreateFileStream (Boolean allowConcurrentWrite) [0x00000] in :0
at NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender.Write (System.Byte[] bytes) [0x00000] in :0
at NLog.Targets.FileTarget.WriteToFile (System.String fileName, System.Byte[] bytes, Boolean justData) [0x00000] in :0
at NLog.Targets.FileTarget.Write (NLog.LogEventInfo logEvent) [0x00000] in :0
at NLog.Targets.Target.Write (AsyncLogEventInfo logEvent) [0x00000] in :0
exception inside UnhandledException handler: Out of memory

OS & Version? Sonaar build?

Is this initial install, or an update, or seemingly out of the blue?

Is it consistent, or intermittent?

What do your system resources look like? (Could it really be an OOM error?)

This is installed on a QNAP TVS-863. The install is over 3 months old, this seems to have started out of the blue. Seems to clear itself once I restart and it is intermittent. I’ll triple check free ram next time it occurs - there is 16gb in the system.

[~] # uname -a
Linux qnap 3.12.6 #1 SMP Tue Feb 17 01:15:20 CST 2015 x86_64 unknown
[~]

Sonar:
Version
2.0.0.2850
Mono Version
3.10.0 (tarball Mon Oct 27 19:35:18 CET 2014)

16 Gb . . . You’d have to have a hell of a runaway process to eat all that up. But I’m not familar with QNAP’s, so I’m not much use beyond this.

Its erroring out trying to write to the log file by the looks of it, I wonder if its failing and causing a retry over and over?

On System: Status there is the AppData Directory, can you verify that the storage that that path exists on isn’t filling up?

It’s a long shot but check out these issues I had over the last 9 months I had the same crash occur twice.

Chances are that this happened due to faulty RAM. Run Memcheck86+. Take note that it took me 18 passes to find the error, though. It was very subtle. It is very unlikely, this is your issue though. But why not let Memtest86+ run over night, I can see no reason why not to.