Skip to content

Dapr - EventHub component - Excessive duration after inactivity #1701

@foliv57

Description

@foliv57

This issue is a:

  • bug report
  • documentation issue or request
  • regression (a behavior that used to work and stopped in a new release)

Issue description

We are using "pubsub.azure.eventhubs" component to publish events to an Azure EventHub from an ASP.NET web application.

After cold start of the containers, the duration of the first publish event is acceptable (1s to 3s). But after a period of inactivity (between 1 and 2 hours), the first publish event takes 15s.

Below the Dapr container log that we see after inactivity:

time="2026-04-29T06:07:46.720941374Z" level=info msg="gRPC API Called" app_id=`XXXXXX-dapr code=0 duration=14801 instance=XXXXXXX--r1-2-1-alpha-0-115-7c457b6544-z9qbp method=/dapr.proto.runtime.v1.Dapr/PublishEvent scope=dapr.runtime.grpc.api-info type=log useragent="grpc-dotnet/2.76.0 (.NET 10.0.7; CLR 10.0.7; net10.0; linux; x64) dapr-sdk-dotnet/v1.17.4+896bff16f9e29feb7a9bd9749a38640103d3b352" ver=1.16.4-msft.2

What we already tried:

  • Replace managed identity by connection string to prevent token aquisition latency
  • Setup min replica to 1 to keep always 1 container app replica
  • Ensured that the DaprClient is injected as Singleton

Environement

  • Dapr component type: pubsub.azure.eventhubs
  • Client SDK: Dotnet Dapr.Client 1.17.0
  • App framework: .NET 10
  • Hosting: Azure Container App
  • Dapr version: 1.16.4-msft.2

Steps to reproduce

  • Deploy an Azure Container App that uses a "pubsub.azure.eventhubs" component to publish events to an Azure EventHub.
  • Make a first cold start publish (Should be fast)
  • Wait for 1 or 2 hours with no activity
  • Make a second publish (Should take more than 10s)

Expected behavior
First publish after inactivity should not take longer than after cold start and be reasonable (~1s to 3s)

Actual behavior
First publish after inactivity takes more than 15s.

Metadata

Metadata

Assignees

Labels

DaprRelated to Dapr in ACAbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions