PowerShell Universal Server is Crashing Constantly

Hi @adam

my Universal.Server (I installed It though MSI) is constantly crashing after a period of time.
I’m running this on Windows Server 2019.

The Windows Eventlog is full with messages.

Sample Message:

Log Name: Application
Source: Universal.Server
Date: 7/11/2020 2:51:51 PM
Event ID: 0
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: xxx
Description:
Category: Universal.Server.Services.DashboardManager
EventId: 0

Failed to flush logs.

Exception:
LiteDB.LiteException: Cannot insert duplicate key in unique index ‘_id’. The duplicate value is ‘"$/dashboardlog/4"’.
at LiteDB.IndexService.AddNode(CollectionIndex index, BsonValue key, Byte level, IndexNode last)
at LiteDB.IndexService.AddNode(CollectionIndex index, BsonValue key, IndexNode last)
at LiteDB.LiteEngine.InsertDocument(CollectionPage col, BsonDocument doc, BsonType autoId)
at LiteDB.LiteEngine.<>c__DisplayClass22_0.b__0(CollectionPage col)
at LiteDB.LiteEngine.Transaction[T](String collection, Boolean addIfNotExists, Func2 action) at LiteDB.LiteEngine.Insert(String collection, BsonDocument doc, BsonType autoId) at LiteDB.LiteStorage.Upload(String id, String filename, Stream stream) at UniversalAutomation.FileStorage1.Insert(T item) in C:\src\universal\src\UniversalAutomation.LiteDB\LiteDBDatabase.cs:line 374
at Universal.Server.Services.DashboardProxy.LogFlushThread() in C:\src\universal\src\Universal.Server\Services\DashboardProxy.cs:line 435

Event Xml:



0
2
0
0x80000000000000

62933
Application
xxx



Category: Universal.Server.Services.DashboardManager
EventId: 0

Failed to flush logs.

Exception:
LiteDB.LiteException: Cannot insert duplicate key in unique index ‘_id’. The duplicate value is ‘"$/dashboardlog/4"’.
at LiteDB.IndexService.AddNode(CollectionIndex index, BsonValue key, Byte level, IndexNode last)
at LiteDB.IndexService.AddNode(CollectionIndex index, BsonValue key, IndexNode last)
at LiteDB.LiteEngine.InsertDocument(CollectionPage col, BsonDocument doc, BsonType autoId)
at LiteDB.LiteEngine.<>c__DisplayClass22_0.<Insert>b__0(CollectionPage col)
at LiteDB.LiteEngine.Transaction[T](String collection, Boolean addIfNotExists, Func2 action) at LiteDB.LiteEngine.Insert(String collection, BsonDocument doc, BsonType autoId) at LiteDB.LiteStorage.Upload(String id, String filename, Stream stream) at UniversalAutomation.FileStorage1.Insert(T item) in C:\src\universal\src\UniversalAutomation.LiteDB\LiteDBDatabase.cs:line 374
at Universal.Server.Services.DashboardProxy.LogFlushThread() in C:\src\universal\src\Universal.Server\Services\DashboardProxy.cs:line 435


That event occours several times.

Than I saw this also:

Log Name: Application
Source: Universal.Server
Date: 7/11/2020 2:53:31 PM
Event ID: 0
Task Category: None
Level: Warning
Keywords: Classic
User: N/A
Computer: xx
Description:
Category: Universal.Server.Services.DashboardManager
EventId: 0

Dashboard proxy for dashboard 4 not found.

Event Xml:



0
3
0
0x80000000000000

62940
Application
xx



Category: Universal.Server.Services.DashboardManager
EventId: 0

Dashboard proxy for dashboard 4 not found.


After That windows error reporting starts and the PowerShell Universal Service is Stoped.

Do you know what the issue is?
What Logs can I provide?

I haven’t seen this specifically but it’s very obvious to me as to what’s happening based on the stack trace in the error log. I’ll get a fix out for the 1.2 build this week. It’s throwing an exception on a background thread which is causing the service to crash.

I don’t need any other logs but thanks for offering.

@adam, I am facing the same issue. The service is crashing quite often. I am using version 1.3.1.

Interesting. I didn’t realize this was still a problem. Can you zip up the event logs for me and send them my way?

Sure, uploaded to OneDrive: https://1drv.ms/u/s!AuCqmYWYQ_kMnohDdN3FQP9wDRgajw?e=O9aAXj