Code Monkey home page Code Monkey logo

Comments (6)

snakefoot avatar snakefoot commented on September 25, 2024 1

@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.

snakefoot avatar snakefoot commented on September 25, 2024

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.

karlra avatar karlra commented on September 25, 2024

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.

karlra avatar karlra commented on September 25, 2024

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.

image

image

from nlog.targets.syslog.

snakefoot avatar snakefoot commented on September 25, 2024

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.

RyanGaudion avatar RyanGaudion commented on September 25, 2024

@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)

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.