Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging stops using archiving and async target #1826

Closed
ChristianHoe opened this issue Dec 5, 2016 · 12 comments
Closed

Logging stops using archiving and async target #1826

ChristianHoe opened this issue Dec 5, 2016 · 12 comments
Labels
bug Bug report / Bug fix file-target
Milestone

Comments

@ChristianHoe
Copy link

ChristianHoe commented Dec 5, 2016

Hi,

I tried to use archiving (DateAndSequence) in combination with async target and keepFileOpen.
Testing this feature locally with our database log worked fine and the archive files where created like expected (Database 20161205.1.log, Database 20161205.2.log ....).

Putting same configuration under stress running multiple WCF-Requests causing the logging to stop. Leaving a valid log file like Database ${522or5ae}.0.log and no further activity.

First I thought it could be something like #1029 but updating from 3.2.0 to 4.3.11 did not help. It looks like the logger dies silently the very moment the current file is archived (see internal log).

The WCF Service is running on Windows Server 2008 and .Net-Framework 4.5.1.

My current work around is using the archiving on daily base only. but files with size of 1.5 GB and more are not easy to handle.

nlog.config.txt

nlog-internal.log.txt

@304NotModified
Copy link
Member

Please fill in the template, thanks!

@ChristianHoe
Copy link
Author

Type

  • Bug

NLog version: 4.3.11

Platform: .Net 4.5

Current NLog config see attached file

In case of a BUG:

  • No logs are written after archiving the first log
  • Logs should be written
  • Internals-Log attached
  • No Exception
  • Not using DateAndSequence
  • No
  • No

@304NotModified 304NotModified added the bug Bug report / Bug fix label Dec 5, 2016
@304NotModified
Copy link
Member

thx!

@304NotModified
Copy link
Member

304NotModified commented Dec 5, 2016

has updated your internallog and removed your email adresses and smtp address

nlog-internal.log.txt

@ChristianHoe
Copy link
Author

Can you please remove the smtp entry from the internal log also? Thx.

@304NotModified
Copy link
Member

yes done :)

@snakefoot
Copy link
Contributor

@ChristianHoe Could you try and add OpenFileCacheTimeout=10 to the file-target configuration? And see if the problem is "fixed".

@304NotModified
Copy link
Member

@ChristianHoe I'm adding more internal logging. Could you test it with a trace internal log soon?

@ChristianHoe
Copy link
Author

Sorry, I am on vacation till begin of january. What is the best way to get the new tracing? Nuget?

@304NotModified
Copy link
Member

@ChristianHoe have a good vacation!

What is the best way to get the new tracing? Nuget?

I mean the internal log as described here: https://github.com/NLog/NLog/wiki/Internal-logging

@snakefoot
Copy link
Contributor

snakefoot commented Jan 3, 2017

Maybe the question was how to get the build that includes this PR: #1872 ?

@304NotModified
Copy link
Member

Ah,

  1. go to FileTarget: more internal logging #1872

  2. go to details of the PR build:
    image

  3. click on artifacts on the right:
    image

  4. Download and install (I use the local nuget storage for that)
    image

short-link for this case: https://ci.appveyor.com/api/buildjobs/6f8felbsc9agdfe5/artifacts/build%2Fbin%2Frelease%2FNuGetPackages%2FNLog.4.4.nupkg

@304NotModified 304NotModified added this to the 4.4.2 milestone Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report / Bug fix file-target
Projects
None yet
Development

No branches or pull requests

3 participants