-
Notifications
You must be signed in to change notification settings - Fork 42
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
Potential threading issue when used with AspNetCore #27
Comments
We have also started to get a similar error, but much more often. Lowering the level of logging to Error has helped a little, but... we still have had to stop using the library, because when increasing the frequency of requests to our API, the frequency of NullReferenceException increases. The last configuration:
|
Thanks for reporting this. The library pushes logs to an internal queue where they are de-queued and sent from background threads (here) so it does indeed look like a threading issue. @darraghjones something in the scope would be my first thought as well. I haven't seen this with aspnetcore 2.0, this will require some investigation. |
We have been able to reproduce the issue with aspnetcore 2.1. It appears to be because of the enumeration of |
I've just pushed v1.5.0-pre1 to nuget.org with an update that should fix this. |
I'm seeing the follow error periodically in my logs....~ 0.5% of requests.
I only get this error when the GelfLoggerProvider is added. From what I've read this could be due to accessing the DefaultHttpContext from multiple threads. I've tried disabling scopes to see if that helped, but I still see the error.
I would also like to point out I only notice this when running on AWS ECS.
The text was updated successfully, but these errors were encountered: