Coder Social home page Coder Social logo

Comments (3)

RehanSaeed avatar RehanSaeed commented on June 11, 2024

What does your exception look like? For some exception types we fallback to using reflection and to avoid doing too much we have to add limits. It sounds like your exeption has multiple nested properties.

from serilog.exceptions.

RehanSaeed avatar RehanSaeed commented on June 11, 2024

Feel free to reopen with more info.

from serilog.exceptions.

krzysiek-b avatar krzysiek-b commented on June 11, 2024

Hi,

Seems like I hit the same issue. Using Serilog self log and using WithExceptionDetails causes the app to consume a lot of memory and write a lot of "Maximum destructuring depth reached" messages.

This looks like this plugin is strugling with recurency here. @codehunter13 did you managed to solve this?

The exception looks simple. We tried to insert more than expected and this was throw
image
from

>	Microsoft.EntityFrameworkCore.Relational.dll!Microsoft.EntityFrameworkCore.Update.AffectedCountModificationCommandBatch.Consume(Microsoft.EntityFrameworkCore.Storage.RelationalDataReader reader) Line 137	C#
 	Microsoft.EntityFrameworkCore.Relational.dll!Microsoft.EntityFrameworkCore.Update.ReaderModificationCommandBatch.Execute(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection) Line 354	C#
 	Microsoft.EntityFrameworkCore.SqlServer.dll!Microsoft.EntityFrameworkCore.SqlServer.Update.Internal.SqlServerModificationCommandBatch.Execute(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection) Line 210	C#
 	Microsoft.EntityFrameworkCore.Relational.dll!Microsoft.EntityFrameworkCore.Update.Internal.BatchExecutor.Execute(System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Update.ModificationCommandBatch> commandBatches, Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection) Line 97	C#
 	Microsoft.EntityFrameworkCore.Relational.dll!Microsoft.EntityFrameworkCore.Storage.RelationalDatabase.SaveChanges(System.Collections.Generic.IList<Microsoft.EntityFrameworkCore.Update.IUpdateEntry> entries) Line 58	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(System.Collections.Generic.IList<Microsoft.EntityFrameworkCore.Update.IUpdateEntry> entriesToSave) Line 1202	C#
Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager stateManager, bool acceptAllChangesOnSuccess) Line 1264	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges.AnonymousMethod__107_0(Microsoft.EntityFrameworkCore.DbContext _, (Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager StateManager, bool AcceptAllChangesOnSuccess) t) Line 1246	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute.AnonymousMethod__0(Microsoft.EntityFrameworkCore.DbContext context, (Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool) state) Line 207	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.ExecuteImplementation<(Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool), int>(System.Func<Microsoft.EntityFrameworkCore.DbContext, (Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool), Microsoft.EntityFrameworkCore.Storage.ExecutionResult<int>> operation, System.Func<Microsoft.EntityFrameworkCore.DbContext, (Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool), Microsoft.EntityFrameworkCore.Storage.ExecutionResult<int>> verifySucceeded, (Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool) state) Line 224	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Storage.ExecutionStrategy.Execute<(Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool), int>((Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool) state, System.Func<Microsoft.EntityFrameworkCore.DbContext, (Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool), int> operation, System.Func<Microsoft.EntityFrameworkCore.DbContext, (Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager, bool), Microsoft.EntityFrameworkCore.Storage.ExecutionResult<int>> verifySucceeded) Line 206	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.ChangeTracking.Internal.StateManager.SaveChanges(bool acceptAllChangesOnSuccess) Line 1242	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.DbContext.SaveChanges(bool acceptAllChangesOnSuccess) Line 628	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.DbContext.SaveChanges() Line 579	C#
 	Audit.EntityFramework.Core.dll!Audit.EntityFramework.Providers.EntityFrameworkDataProvider.InsertEvent(Audit.Core.AuditEvent auditEvent)	Unknown
 	Audit.NET.dll!Audit.Core.AuditScope.SaveEvent(bool forceInsert)	Unknown
 	Audit.NET.dll!Audit.Core.AuditScope.Save()	Unknown
 	Audit.EntityFramework.Core.dll!Audit.EntityFramework.DbContextHelper.SaveScope(Audit.EntityFramework.IAuditDbContext context, Audit.Core.IAuditScope scope, Audit.EntityFramework.EntityFrameworkEvent event)	Unknown
 	Audit.EntityFramework.Core.dll!Audit.EntityFramework.DbContextHelper.EndSaveChanges(Audit.EntityFramework.IAuditDbContext context, Audit.Core.IAuditScope scope, int result, System.Exception exception)	Unknown
 	Audit.EntityFramework.Core.dll!Audit.EntityFramework.AuditSaveChangesInterceptor.SaveChangesFailed(Microsoft.EntityFrameworkCore.Diagnostics.DbContextErrorEventData eventData)	Unknown
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.Diagnostics.CoreLoggerExtensions.SaveChangesFailed(Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Update> diagnostics, Microsoft.EntityFrameworkCore.DbContext context, System.Exception exception) Line 59	C#
 	Microsoft.EntityFrameworkCore.dll!Microsoft.EntityFrameworkCore.DbContext.SaveChanges(bool acceptAllChangesOnSuccess) Line 658	C#
 	[The 9 frame(s) above this were repeated 28 times]	

from serilog.exceptions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.