Seq Documentation and Support

Welcome to the Seq documentation hub. You'll find comprehensive guides and documentation to help you start working with Seq as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    
Ask A Question

Questions

3

AKS out of memory exception

I have started 2020.3 in a pod but after a while the logs show OutOfMemoryEception and the app isn't responding. This is is the yaml: apiVersion: v1 kind: Pod metadata: name: seq labels: app: seq spec: nodeSelector: "kubernetes.io/os": linux containers: - name: seq image: mediafy.azurecr.io/datalust/seq:2020.3 resources: requests: memory: "2Gi" cpu: "250m" limits: memory: "4Gi" cpu: "500m" ports: - containerPort: 80 - containerPort: 5341 env: - name: ACCEPT_EULA value: "Y" volumeMounts: - mountPath: "/data" name: volume volumes: - name: volume persistentVolumeClaim: claimName: seq-managed-disk This is a piece of logs from the pod which is keep repeating: [23:33:47 ERR] Exception from task "Retention and Indexing" System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at Newtonsoft.Json.JsonTextReader.Read() at Flare.MemoryEncoding.Serializer.Deserialize(Span`1 documentBytes, SharedAssets shared) at Flare.Storage.StorageEngine.UpdateIndexes(IndexPredicate[] indexPredicates, CancellationToken cancel) at Flare.Events.EventStore.UpdateIndexes(IEnumerable`1 indexes, CancellationToken cancel) at Flare.Queries.DataStore.UpdateIndexes(IEnumerable`1 indexes, CancellationToken cancel) at Seq.Server.Features.Indexing.EventStoreIndexer.Index(TimeSpan allocatedIndexingTime, CancellationToken cancel) at Seq.Server.Features.Retention.RetentionAndIndexingTask.Execute(CancellationToken cancel) at Seq.Server.Tasks.TaskRunTimer.Execute(CancellationToken cancel) at Seq.Server.Tasks.TaskRunTimer.<OnTimer>b__9_0(CancellationToken cancel) [23:34:30 INF] 1 more generation 2 garbage collection(s) occurred [23:38:05 INF] Metrics sampled [23:42:46 INF] Native storage metrics sampled [23:43:05 INF] Metrics sampled [23:43:39 INF] Applying 1 retention policies [23:43:39 INF] Removing all events before "2020-08-10T23:40:00.0000000Z" under policy "retentionpolicy-36" [23:43:39 INF] Retention policy progressed in 0.0634 ms (headway: null×), will resume from "2020-08-10T23:40:00.0000000Z" [23:43:39 INF] Retention processing and compaction took 5.7259 ms; allocating 599994.2741 ms for indexing [23:43:39 INF] Beginning indexing [23:43:56 ERR] Exception from task "Retention and Indexing" System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at Newtonsoft.Json.JsonTextReader.EnsureBufferNotEmpty() at Newtonsoft.Json.JsonTextReader.ReadStringIntoBuffer(Char quote) at Newtonsoft.Json.JsonTextReader.ParseValue() at Flare.MemoryEncoding.Serializer.ReadProperty(JsonTextReader json, List`1 properties, List`1 values, SharedAssets sharedAssets) at Flare.MemoryEncoding.Serializer.ReadObject(JsonTextReader json, SharedAssets shared) at Flare.MemoryEncoding.Serializer.Deserialize(Span`1 documentBytes, SharedAssets shared) at Flare.Storage.StorageEngine.UpdateIndexes(IndexPredicate[] indexPredicates, CancellationToken cancel) at Flare.Events.EventStore.UpdateIndexes(IEnumerable`1 indexes, CancellationToken cancel) at Flare.Queries.DataStore.UpdateIndexes(IEnumerable`1 indexes, CancellationToken cancel) at Seq.Server.Features.Indexing.EventStoreIndexer.Index(TimeSpan allocatedIndexingTime, CancellationToken cancel) at Seq.Server.Features.Retention.RetentionAndIndexingTask.Execute(CancellationToken cancel) at Seq.Server.Tasks.TaskRunTimer.Execute(CancellationToken cancel) at Seq.Server.Tasks.TaskRunTimer.<OnTimer>b__9_0(CancellationToken cancel) How much memory does it need? Or is there other configuration that I'm missing?

Posted by Costin Morariu 5 months ago

3

Cannot log to Seq from Serilog with .NET Core 3.1

Hi I cannot log to Seq when targeting .NET Core 3.1 in any type of application. Below is a sample Console application which illustrates the issue. class Program { static void Main(string[] args) { Log.Logger = new LoggerConfiguration() .WriteTo.Seq("http://localhost:5341") .WriteTo.Console() .AuditTo.Seq("http://localhost:5341") .CreateLogger(); Serilog.Debugging.SelfLog.Enable(Console.Error); Log.Information("Testing from Console"); try { Console.WriteLine("Hello World!"); } finally { Log.CloseAndFlush(); } } } [16:47:37 INF] Testing from Console 2020-10-14T06:47:37.2569282Z Exception while emitting periodic batch from Serilog.Sinks.Seq.SeqSink: Serilog.Debugging.LoggingFailedException: Received failed result NotFound when posting events to Seq at Serilog.Sinks.Seq.SeqSink.EmitBatchAsync(IEnumerable`1 events) at Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink.OnTick() 2020-10-14T06:47:37.2569282Z Caught exception while emitting to sink Serilog.Sinks.Seq.Audit.SeqAuditSink: System.AggregateException: One or more errors occurred. (Received failed result NotFound when posting events to Seq) ---> Serilog.Debugging.LoggingFailedException: Received failed result NotFound when posting events to Seq at Serilog.Sinks.Seq.Audit.SeqAuditSink.EmitAsync(LogEvent logEvent) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Serilog.Sinks.Seq.Audit.SeqAuditSink.Emit(LogEvent logEvent) at Serilog.Core.Sinks.AggregateSink.Emit(LogEvent logEvent) Unhandled exception. System.AggregateException: Failed to emit a log event. (One or more errors occurred. (Received failed result NotFound when posting events to Seq)) ---> System.AggregateException: One or more errors occurred. (Received failed result NotFound when posting events to Seq) ---> Serilog.Debugging.LoggingFailedException: Received failed result NotFound when posting events to Seq at Serilog.Sinks.Seq.Audit.SeqAuditSink.EmitAsync(LogEvent logEvent) --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) at System.Threading.Tasks.Task.Wait() at Serilog.Sinks.Seq.Audit.SeqAuditSink.Emit(LogEvent logEvent) at Serilog.Core.Sinks.AggregateSink.Emit(LogEvent logEvent) --- End of inner exception stack trace --- at Serilog.Core.Sinks.AggregateSink.Emit(LogEvent logEvent) at Serilog.Core.Logger.Dispatch(LogEvent logEvent) at Serilog.Core.Logger.Write(LogEventLevel level, Exception exception, String messageTemplate, Object[] propertyValues) at Serilog.Core.Logger.Write(LogEventLevel level, String messageTemplate, Object[] propertyValues) at Serilog.Core.Logger.Write(LogEventLevel level, String messageTemplate) at Serilog.Log.Write(LogEventLevel level, String messageTemplate) at Serilog.Log.Information(String messageTemplate) at TestSEQ_VS2019_Console.Program.Main(String[] args) in C:\Code\Mine\Testing\C# Testing\TestSEQ_VS2019_Console\TestSEQ_VS2019_Console\Program.cs:line 20 There seems to be a common issue of "Not Found" error but I cannot glean any further details. My Seq instance is working and from a browser I can navigate to http://localhost:5341 ok I am using v4.2.1113 as I am on Windows 7. The output shows the Console sink works fine (and i've also successfully tried File too). If I change the target framework to .NET Core 2.1 it works fine. Can you point me to any issue or help me know where to possibly find where the issue is? Thanks

Posted by Jason 6 months ago