Comments (8)
Hi @NizamLZ , thank you for the report and sorry for the problem.
Could you tell us more about your use case?
Do you have any idea how you got millions of objects in such a short time? Destructurer works only when there are exceptions, do you have that many exceptions? Could you show me what kind of exceptions are you throwing?
The <String, Object>
dictionary that is mentioned is a local variable so currently I assume it is not a culprit of a memory leak.
from serilog.exceptions.
Hi @krajek,
I agree, its not a leak.
The stack trace showed that there was an exception(logger.log invocation), not millions, only one. The control went into Destructurer and did not come out.
I believe Destructurer reached the DB Context->Db Set or directly DB Set and started reading it, making the EF Core hit the db and get the entires.
One thing to note is that all of the entities in memory belong to same entity type but their values are different which makes me believe that the records are read from the database rather than being the clone of the same object.
I can share the dot memory workspace file (~2.5GB), It needs a system with more than 32GB of ram, to which I no longer have access and cannot look deeper into the call stack etc. by myself.
from serilog.exceptions.
Got it. What is the type of an exception?
A) In general, if you have a problem with the particular type of exceptions you can implement custom destructurer. In your case, you would just ignore properties that reach DbContext
and avoid the problem altogether.
B) #117 Lately there was an accepted PR that seems to be closely related to your problem. I didn't follow closely, but that may be helpful.
C) It could be useful to use some SQL Profiler to investigate if the assumptions that DbContext started reading the whole table is correct.
from serilog.exceptions.
Hey @NizamLZ, hope all is well.
If this is EF Core, then there is a new package to deal with it's exceptions.
from serilog.exceptions.
@krajek, They are sql timeout exceptions. Thanks for options A & C, will try to do one of those.
I knew B and hence updated the package to 5.2.1 very recently. This started after that itself. Never happened with old version, hence wanted to let you guys know.
Hey @RehanSaeed, all good here. Hope you are doing good as well.
Which package are you referring to?
from serilog.exceptions.
There are two packages on the home page. One for SqlException and one for EF Core exceptions.
from serilog.exceptions.
I knew B and hence updated the package to 5.2.1 very recently.
The latest package is not enough, did you add the DbUpdateExceptionDestructurer
during setup?
from serilog.exceptions.
Closing. Feel free to reopen if the other packages I mentioned are not enough.
from serilog.exceptions.
Related Issues (20)
- [Docs] Destructurer via json HOT 3
- Add configuration example to readme HOT 1
- Separated Column or Porperty for exception stacktrace HOT 2
- Exception with redefined property(new modifier) stops enrichment altogether HOT 13
- Dependency Dashboard
- Not showing Exception stack trace in "Exception" field of the log HOT 13
- Add destructurer for Refit ApiException HOT 4
- Filtering out any property from a direct property of ExceptionDetails HOT 3
- Create Custom Destructurers for More Exceptions HOT 7
- mapper [NpgsqlValue] cannot be changed from type [date] to [ObjectMapper] HOT 3
- EF6 - protection against logging entire db. HOT 1
- Entity Framework Logging Behaviour HOT 2
- Exceptions with large properties HOT 3
- Same Key Added Exception in ExceptionPropertiesBag HOT 5
- [TaskCanceledExceptionDestructurer] Destructured object type inconsistent HOT 1
- Maximum destructuring depth reached. HOT 3
- Demystified exception stack trace support HOT 1
- Serilog.Exceptions.EntityFrameworkCore docs warning unclear HOT 1
- Request that Serilog.Exceptions.EntityFrameworkCore description also includes Serilog appsetting.json example HOT 1
- FOSSA Compliance tool license missing for v4.1.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serilog.exceptions.