Groom is failing here after the update. Any ideas?
[ERR][UniversalAutomation.GroomService] Failed to groom.
System.InvalidOperationException: The LINQ expression 'DbSet<Terminal>()
.Where(t => t.Name
.EqualsIgnoreCase(__ti_Terminal_0))' could not be translated. Additional information: Translation of method 'PowerShellUniversal.StringExtensions.EqualsIgnoreCase' failed. If this method can be mapped to your custom function, see https://go.microsoft.com/fwlink/?linkid=2132413 for more information. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to 'AsEnumerable', 'AsAsyncEnumerable', 'ToList', or 'ToListAsync'. See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
at Microsoft.EntityFrameworkCore.Query.QueryableMethodTranslatingExpressionVisitor.Translate(Expression expression)
at Microsoft.EntityFrameworkCore.Query.QueryCompilationContext.CreateQueryExecutor[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.<>c__DisplayClass9_0`1.<Execute>b__0()
at Microsoft.EntityFrameworkCore.Query.Internal.CompiledQueryCache.GetOrAddQuery[TResult](Object cacheKey, Func`1 compiler)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.Execute[TResult](Expression query)
at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryable`1.GetEnumerator()
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
at PowerShellUniversal.MemoryTable`1..ctor(IEnumerable`1 items) in C:\actions-runner\_work\universal\universal\src\PowerShellUniversal\MemoryTable.cs:line 10
at PowerShellUniversal.Extensibility.EFTable`2.Where(Expression`1 predicate) in C:\actions-runner\_work\universal\universal\src\PowerShellUniversal.Extensibility\Persistence\EFTable.cs:line 570
at UniversalAutomation.GroomService.GroomIdleTerminals() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GroomService.cs:line 54
at UniversalAutomation.GroomService.Groom() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GroomService.cs:line 296
I just restored a snapshot to roll back to 5.0.16. 5.1.0 was causing a memory leak. The Universal.Server.exe was taking 4.9 GB of memory, and the entire server was unresponsive. No changes to any scripts or schedules were made post-upgrade from 5.0.16 to 5.1.0.
Seeing the same here, after 24hr or so Iām up to ~5gb. Only 2 apps, normal usage seems like 1gb after a restart.
I do update a large hashtable every hour into the persistent cache, I was wondering if it wasnāt purging the old values automatically when overwritten.
Iāve already gone back to 5.0.16 so I canāt provide that unless I upgrade again. I will upgrade my test environment. but we donāt run anything there, so I donāt know for sure that itāll happen on that system.
5.1.0 upgrade went well for me.
4 days up, I just checked memory and we are at 2GB, but the server is not being used heavily.
I have process explorer running and keep an eye on it.
Also, unable to view root directory of scripts in folder view, but can see them in list view. It is only the root folder (Scripts folder in the image) if I select a sub folder the scripts within that folder are visible.
So far my dev. environment hasnāt had a memory issue, but itās literally not doing anything other than running whatever internal healthchecks and tasks PSU runs on any installation.
I think weāve found root cause for the memory issue. Entity Framework (our DB ORM), it eagerly loading tons of data during job executions. This is causing both large amounts of data to be returned from the database and then equally amounts of large data to be updated in the database. This puts a ton of strain on both PSU and the DB. Additionally, the eager loading is happening when using Get-PSUJob or viewing the jobs table, which can put more load on the system.
On small, less busy environments it was likely not noticeable but once that jobs table reaches a certain size, it will be. It is possible to reproduce this by running 10s of jobs at once or by using child jobs. It will also cause jobs to have invalid state and time stamps. It looks like this was a problem since somewhere in the 5.0.x release but Iām not clear on the specific version or why 5.1 exasperated the problem.
Weāll have a 5.1.2 release coming out shortly to address this.