Service crash randomly


every so often the PU service crashes, how do I find out why? I have the service set to auto restart so that keeps things functioning but I do want to find out why.


Can you check in event viewer for errors? It should contain a stack trace that includes source code info about where this was happening. The title probably has .NET in the name. I thought we had resolved this but it was happening with dashboard logging previously.

This is the only warning I see:

Category: UniversalAutomation.DashboardController
EventId: 0
RequestId: 0HM34JOEGO51S:0000001F
RequestPath: /api/v1/dashboard/19/diagnostics
SpanId: 759f719c5b45cb46
TraceId: 07af0486265a2a4d93aa64d95ef1c88b
ParentId: 0000000000000000
ActionId: 85dc8756-aecf-4931-b717-1f7725767092
ActionName: UniversalAutomation.DashboardController.GetDiagnosticsAsync (Universal.Server)

Dashboard 19 not found.

The error I see are as follows:

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

The specified RequiredModules entry ‘Universal’ in the module manifest ‘C:\Program Files (x86)\Universal\UniversalDashboard\Frameworks\v3\UniversalDashboard.psd1’ is invalid. Try again after updating this entry with valid values.

Faulting application name: Universal.Server.exe, version:, time stamp: 0x5dcec899
Faulting module name: KERNELBASE.dll, version: 10.0.17763.1432, time stamp: 0x9b30685b
Exception code: 0xe0434352
Fault offset: 0x0000000000039689
Faulting process id: 0x1648
Faulting application start time: 0x01d693590ff6aefc
Faulting application path: C:\Program Files (x86)\Universal\Universal.Server.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: f157f1eb-53e5-49f2-8a96-1343e0b1fd0c
Faulting package full name:
Faulting package-relative application ID:

Application: Universal.Server.exe
CoreCLR Version: 4.700.19.56402
.NET Core Version: 3.1.0
Description: The process was terminated due to an unhandled exception.
Exception Info: LiteDB.LiteException: Cannot insert duplicate key in unique index ‘_id’. The duplicate value is ‘"$/dashboardlog/17\00001"’.
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, Func`2 action)
at LiteDB.LiteEngine.Insert(String collection, BsonDocument doc, BsonType autoId)
at LiteDB.LiteFileStream.WriteChunks()
at LiteDB.LiteFileStream.Flush()
at LiteDB.LiteFileStream.Dispose(Boolean disposing)
at LiteDB.LiteFileStream.Finalize()

Category: Universal.Server.Services.DashboardManager
EventId: 0
RequestId: 0HM31E0TKKN3M:00019321
RequestPath: /api/v1/dashboard
SpanId: 68338bcc1f45e245
TraceId: 5c405b3fb9bed04694188342e612b645
ParentId: 0000000000000000
ActionId: f422a6c0-03e8-457a-aa3f-ccfbd60cdb4d
ActionName: UniversalAutomation.DashboardController.Post (Universal.Server)

Failed to flush logs.

Ok. Thanks. That’s exactly what I need. It’s the same stack trace as before and I thought this was fixed but apparently not.

Ok cool. Glad its not something I was doing.

Let me know if I can help any further.