Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4006540
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:31:38+00:00 2026-05-20T08:31:38+00:00

I have problem with this method in NLog library: NLog.Targets.Wrappers.AsyncTargetWrapper.ProcessPendingEvents(object state) It consume too

  • 0

I have problem with this method in NLog library: NLog.Targets.Wrappers.AsyncTargetWrapper.ProcessPendingEvents(object state)

It consume too much cpu time. I have long running windows service using Nlog and after two days my service consume over 80% cpu time (one core is almost on 80%, second 30%). It is not 100% cpu time but it is changing and after cca 2 hours its back to normal. So I have run profiler and this metod maybe cause it: NLog.Targets.Wrappers.AsyncTargetWrapper.ProcessPendingEvents(object state)

I have 10 file targets all are setted as async. It is a fact that I have lot of logging in my app but only on level Trace, if I switched to Info level it not helped.

Can you help me, should I decrease logging in my app?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T08:31:38+00:00Added an answer on May 20, 2026 at 8:31 am

    According to this thread I would also guess that setting a higher number for timeToSleepBetweenBatches should reduce the high cpu time. Seems that the 2.0 beta of NLog should fix this behavor by only having one lazy writer thread running at a time.

    In the meanwhile you don’t have to change the source code to change timeToSleepBetweenBatches. You can set it in the configuration file:

    <targets>
      <target xsi:type="AsyncWrapper"
              name="String"
              queueLimit="Integer"
              timeToSleepBetweenBatches="Integer"
              batchSize="Integer"
              overflowAction="Enum">
        <target xsi:type="wrappedTargetType" ...target properties... />
      </target>
    </targets>
    

    Buffering Options
    timeToSleepBetweenBatches – Time in milliseconds to sleep between batches.Integer Default: 50

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I made my first jQuery plugin attempt, but I have this problem/bug which I
Ok guys this makes no sense... I have this method: // break down the
Hi I have to use noConflict method in my project. But I have a
I have an optimization problem as follows. Given an array of positive integers, e.g.
I have method which have to add customer: [WebInvoke(UriTemplate = /, Method = POST,
First off - apologies if this or a similar question has been asked before.
I have following code snippet in jquery.In which,I want to animate each element of
We had a bit of a problem. :) We want to ensure that only
I'm using ASP.NET with VB, and .NET version 3.5. In the project, I've got

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.