Comments (6)
@RyanGaudion I know about the NLog-core, but I don't know much about the SysLog-target or your environment. Without providing details about where threads are stuck in your application along with memory-usage-details, then it is hard to guess the cause of your problems.
from nlog.targets.syslog.
Think you need to capture a minidump from the application, and open that minidump in Visual Studio.
Then look at the thread callstacks using Visual Studio (maybe using Visual Studio Parallel Stacks), and determine why it is getting stuck.
When having pin-pointed the thread(s) causing the "stop", then you can paste the thread callstacks here for further investigation.
Have you tried upgrading to latest version?
from nlog.targets.syslog.
I'll try that the next time it happens, but it's not easy because our systems have a lot of traffic and a lot of active threads. When I say stop, I don't mean that the application itself hangs up, because it keeps processing requests and there is no growth in memory usage either which would indicate queuing. Can you give me some kind of starting point at what I should be looking for in the minidump?
I am using these settings:
target.Enforcement.Throttling.Limit = 10000;
target.Enforcement.ReplaceInvalidCharacters = true;
target.Enforcement.Throttling.Strategy = NLog.Targets.Syslog.Settings.ThrottlingStrategy.Discard;
target.MessageCreation.Facility = NLog.Targets.Syslog.Settings.Facility.Local1;
target.MessageCreation.Rfc = NLog.Targets.Syslog.Settings.RfcNumber.Rfc5424;
target.MessageCreation.Rfc5424.DisableBom = true;
The behaviour suggest that it starts discarding messages but what could be causing that? I don't think there is anything wrong with our syslog because other sources (other apps on the same machine) keep writing successfully.
I'll try upgrading to the most recent version in the mean time.
from nlog.targets.syslog.
It happened again and I dumped the process. There are no stuck threads, but there is a lot of NLog objects and I don't know why. Also there are over 10.000 NLog objects in a dictionary the LOH.
from nlog.targets.syslog.
If you have a queue of pending NLog LogEvents that are not yet written, then they will ofcourse stay in memory.
The NLog MruCache is used for caching known object-types and their object-property-names.
You are using old NLog v4.5.4, which doesn't include this MruCache-Initial-Capacity-fix: NLog/NLog#4021
I can only recommend that you upgrade to NLog v4.7.15 (Or even better NLog v5)
from nlog.targets.syslog.
@snakefoot this has happened multiple times for us too. Most recently using Nlog 5.2.8 and NLog.Targets.Syslog 7.0.0.
Just like @karlra - logs just stop being sent via syslog, however are still written to other targets such as log files.
It seems to occur when a very large log tries to be written (normally if serializing a very large object into the log). As per #313 we've tried to truncate our logs - but that doesn't seem to work either.
from nlog.targets.syslog.
Related Issues (20)
- Delivery issues result in infinite retries HOT 1
- Delivery issues can result in lost log entries HOT 4
- UnobservedTaskException thrown on configuration reload HOT 3
- Superfluous catch of OperationCanceledException
- Support for .NET Framework not needed
- Multiple build services are used
- How to get started is missing HOT 1
- Extensions section missing in sample configuration HOT 1
- NLog version in README is wrong
- Build badges in README are not relevant
- NuGet publication fails with Powershell error
- NuGet publication unable to find packages
- Is the target compatible with the new NLog extension configuration? HOT 32
- Improper dependency handling with .NET Framework application HOT 5
- structured logging - Escaping special characters for ${all-event-properties} layout renderer HOT 1
- Add support for TLS (TLS server certificate validation)
- Truncation not Working HOT 1
- Infinite retries by default = memory leak by default HOT 1
- Fails to connect TCP socket on Android in Maui 8 (.Net 8) stack
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 nlog.targets.syslog.