serilog-archive/serilog-sinks-azuredocumentdb

Actor thread blocking at Serilog.Sinks.Batch.BatchProvider.EventPump

manoj-kumar1 opened this issue · 1 comments

Hi All,

I am using Azure document Db logger sink with Azure service fabric Actors and when we deploy these actor services in Azure service fabric cluster, logs are not written to document db. After analyzing DUMP files we find that all Actors have one thread is blocking at below method:
Serilog.Sinks.Batch.BatchProvider.EventPump

Is it happening due to batching. Why Actor thread is getting blocked... After further investigation, the collection link is ‘dbs/Z0FDAA==/colls/Z0FDAJSwbQA=/’
Is this normal/correct?? I am using following configuration appsettings to write logs into Doc db:
<add key="LogLevel" value="Info"/> <add key="serilog:using:AzureDocumentDB" value="Serilog.Sinks.AzureDocumentDB" /> <add key="serilog:write-to:AzureDocumentDB.endpointUrl" value="https://XXXXXXX.documents.azure.com:443/" /> <add key="serilog:write-to:AzureDocumentDB.authorizationKey" value="******************x5szfD2bnwa6s40QPhvTAyxw5jfhjk678sfw6sdghdfgecpUF3FMBlXnG58UQ32w==" /> <add key="serilog:write-to:AzureDocumentDB.timeToLive" value="864000" />

Although this sink hasn’t been tested in said environment but I’ll look into issue. However, it flushs log under two circumstances.

after certain timeout, normally 10 seconds
Or when batch completes

please send a testable solution