diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 76b60ddf..f90fcd7d 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -41,9 +41,7 @@ todo: add backup master time out setting TODO: BIG UPDATE ALL GUTS -todo: do I have a memory leak or something? - I'm seeing gc not collecting beyond a certain point and possibly rising over time gen0 - https://docs.microsoft.com/en-us/aspnet/core/performance/memory?view=aspnetcore-3.1 + todo: notification? diff --git a/server/AyaNova/Controllers/ServerMetricsController.cs b/server/AyaNova/Controllers/ServerMetricsController.cs index 4922b88f..ba2cba0c 100644 --- a/server/AyaNova/Controllers/ServerMetricsController.cs +++ b/server/AyaNova/Controllers/ServerMetricsController.cs @@ -49,9 +49,17 @@ namespace AyaNova.Api.Controllers serverState = apiServerState; } +#if (DEBUG) + [HttpGet("collect")] + public ActionResult GetCollect() + { + GC.Collect(); + GC.WaitForPendingFinalizers(); + GC.Collect(); - - + return Ok(); + } +#endif /// /// Get Memory and CPU server metrics for time period specified