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

Memory leak eventually causing program to crash due to OutOfMemoryException #99

Closed
ShamsulAmry opened this issue May 28, 2018 · 4 comments

Comments

@ShamsulAmry
Copy link
Contributor

Tested few around of using and not using bugsnag (v2.0.2). Using bugsnag is causing OutOfMemoryException in a console application running on .Net 4.7.2 with high frequency of reported unhandled exception.

From the performance counter that I collected, the Gen 2 and large object heap size are steadily increasing.

@martin308
Copy link
Contributor

@ShamsulAmry thanks for reporting this, I'll try to reproduce this and take a look at your PR to see if that solves the issue

@martin308
Copy link
Contributor

I have not been able to reproduce any memory leaks in a .net 4.7.2 console application that continually sends exceptions in a tight loop. Memory usage does rise though as it is processing the queue of exceptions to send. #101 will help with memory usage while it is processing exceptions so I'll get that merged and released tomorrow. Thanks!

Let me know if you can reproduce a memory leak in some sample code that you can point me at and I can take a look at that.

  class Program
  {
    static void Main(string[] args)
    {
      var bugsnag = new Bugsnag.Client(new Configuration("your-api-key-goes-here"));
      for (int i = 0; i < 10000; i++)
      {
        bugsnag.Notify(new Exception());
      }
    }
  }

@ShamsulAmry
Copy link
Contributor Author

My actual scenario: there are on average 30 lines of stack trace and attached context information to the report. It will take me some time to prepare sample code equivalent to that. Regretfully I had to disable the bugsnag reporting module in my app at the moment.

@martin308
Copy link
Contributor

@ShamsulAmry if you are able to provide any more details about your app/use case to support@bugsnag.com we can try and get to the bottom of it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants