Skip to content

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

Closed

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.

Activity

  1. added theissue type on Oct 8, 2025
  2. TaoChenOSU commented on Oct 8, 2025

    @TaoChenOSU
    Contributor

    Hi!

    You mentioned that it worked well locally but unstable when you deployed your app. Can you confirm that it works locally 100% of the time? And could you let us know the timeout you set?

  3. Cynthia611 commented on Oct 8, 2025

    @Cynthia611
    Author

    Hi!

    You mentioned that it worked well locally but unstable when you deployed your app. Can you confirm that it works locally 100% of the time? And could you let us know the timeout you set?

    Yeah, when testing locally, not seeing that issue. Time out we set is 180s.

  4. TaoChenOSU commented on Oct 8, 2025

    @TaoChenOSU
    Contributor

    Could you provide some code that we can use to reproduce the issue?

  5. Cynthia611 commented on Oct 8, 2025

    @Cynthia611
    Author

    Hi, I can share you the repo. Since it's Microsoft internal, do you mind if we can sync up offline?

  6. TaoChenOSU commented on Oct 8, 2025

    @TaoChenOSU
    Contributor

    Yes, off course

  7. TaoChenOSU commented on Oct 9, 2025

    @TaoChenOSU
    Contributor

    The customer agreed to find a reproduction locally. Closing for now.

  8. Ross-Tarrant commented on Oct 10, 2025

    @Ross-Tarrant

    I'm also seeing this issue, while using version 1.65. Was there any resolution that can be shared?

  9. changed the title [-]Bug: Semantic Kernel Agent Orchestration Time Out[/-] [+].Net: Bug: Semantic Kernel Agent Orchestration Time Out[/+] on Oct 13, 2025
  10. shastitkoepm commented on Nov 8, 2025

    @shastitkoepm

    I've faced with the same issue. Does not work even locally.
    ver 1.67.1-preview

    Timeout is 240 s

    info: Microsoft.SemanticKernel.Agents.Orchestration.Concurrent.ConcurrentOrchestration[0]
    REGISTER ACTOR ConcurrentOrchestration RESULTS: ConcurrentOrchestration_f0070b06fc794968b68c2471d118560c_Results
    info: Microsoft.SemanticKernel.Agents.Orchestration.Concurrent.ConcurrentOrchestration[0]
    REGISTER ACTOR ConcurrentOrchestration MEMBER #1: ConcurrentOrchestration_f0070b06fc794968b68c2471d118560c_Agent_1
    info: Microsoft.SemanticKernel.Agents.Orchestration.Concurrent.ConcurrentOrchestration[0]
    REGISTER ACTOR ConcurrentOrchestration MEMBER #2: ConcurrentOrchestration_f0070b06fc794968b68c2471d118560c_Agent_2
    info: Microsoft.SemanticKernel.Agents.Orchestration.Concurrent.ConcurrentOrchestration[0]
    INVOKE ConcurrentOrchestration: ConcurrentOrchestration_f0070b06fc794968b68c2471d118560c/default
    info: Microsoft.SemanticKernel.Agents.Orchestration.AgentOrchestration.RequestActor[0]
    INIT ConcurrentOrchestration: ConcurrentOrchestration_f0070b06fc794968b68c2471d118560c_Boot/default
    info: Microsoft.SemanticKernel.Agents.Orchestration.AgentOrchestration.RequestActor[0]
    START ConcurrentOrchestration: ConcurrentOrchestration_f0070b06fc794968b68c2471d118560c_Boot/default
    fail: Microsoft.SemanticKernel.Agents.Orchestration.Concurrent.ConcurrentOrchestration[0]
    TIMEOUT ConcurrentOrchestration: ConcurrentOrchestration_f0070b06fc794968b68c2471d118560c/default

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions