Skip to content

.Net: Bug: Semantic Kernel Agent Orchestration Time Out #13233

@Cynthia611

Description

@Cynthia611

Describe the bug
I'm using Semantic Kernel Agent 1.57.0 preview library to build agentic flow. I wanted to kindly follow up on the timeout issue we’ve been encountering recently with SK:

  1. We observe that timeouts occur after the app service has been running for some time. Restarting the service seems to temporarily resolve the issue, which suggests it might be related to state or caching.
  2. OpenAI calls are not experiencing timeouts, so the issue appears to be specific to SK.
  3. Could this be related to the preview environment?
  4. Would you be able to advise on how we can access logs or error traces within SK to help with further troubleshooting?

To Reproduce
Steps to reproduce the behavior:

  1. Library: Semantic Kernel Agent 1.57.0 preview

  2. Call var agentOrchestration= new SequentialOrchestration<KernelArguments, string>(
    agents.XXX, agents. XXX)
    {
    ResponseCallback = (chatContent) => CaptureAgentResponse(XXX)
    };
    var result = await agentOrchestration.InvokeAsync(args, runtime, cancellationToken);

  3. It worked well for local run, or sometime after app service started.

  4. However, after running a while from app service, it started to face time out. No Open AI calls errors.

  5. See error
    System.TimeoutException: Orchestration did not complete within the allowed duration (00:02:30).
    at Microsoft.SemanticKernel.Agents.Orchestration.OrchestrationResult1.GetValueAsync(Nullable1 timeout, CancellationToken cancellationToken)

System.TimeoutException:
at Microsoft.SemanticKernel.Agents.Orchestration.OrchestrationResult1+<GetValueAsync>d__11.MoveNext (Microsoft.SemanticKernel.Agents.Orchestration, Version=1.57.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Threading.Tasks.ValueTask1.get_Result (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
Image

Image

Expected behavior
Restarting the app service can temporarily fix this. However, would like to understand how to make it more reliable? Is it due to preview version? And how to access SK logs to get more troubleshooting?

Screenshots
Image

Image

Platform

  • Language: C#
  • Source: NuGet package version 1.57.0 preview
  • AI model: AzureOpenAI:GPT-4o
  • IDE: Visual Studio
  • OS: Windows

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

.NETIssue or Pull requests regarding .NET codebugSomething isn't workingmulti-agentIssues for multi-agent orchestrationtriage

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions