Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] GetProcessorCount for webjobs service bus extension does not override processor count for flex consumption #45970

Open
paulbatum opened this issue Sep 13, 2024 · 3 comments
Labels
Client This issue points to a problem in the data-plane of the library. Functions needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@paulbatum
Copy link
Member

paulbatum commented Sep 13, 2024

Library name and version

Microsoft.Azure.WebJobs.Extensions.ServiceBus 5.16.4.0

Describe the bug

Logic that uses the processor count to figure out default value of maxConcurrentCalls needs to special case the flex consumption SKU similar to how it special cases the consumption SKU.

This logic is in the GetProcessorCount helper.

https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/servicebus/Microsoft.Azure.WebJobs.Extensions.ServiceBus/src/Utility.cs#L14

Here is some relevant code from functions host for detecting flex consumption via environment variables:
https://github.com/Azure/azure-functions-host/blob/f58df65944a2eca87c7ce0e837b2141f4b0a95bf/src/WebJobs.Script/Environment/EnvironmentExtensions.cs#L225
https://github.com/Azure/azure-functions-host/blob/f58df65944a2eca87c7ce0e837b2141f4b0a95bf/src/WebJobs.Script/ScriptConstants.cs#L119

Expected behavior

Flex consumption apps default to using maxConcurrentCalls = 16.

Actual behavior

Flex consumption apps default to using maxConcurrentCalls = 64, because the system thinks the processor count is 4.

Reproduction Steps

Deploy a service bus triggered function on flex consumption and observe the concurrency behavior.

Copy link

Thank you for your feedback. Tagging and routing to the team member best able to assist.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Bus labels Sep 13, 2024
@paulbatum
Copy link
Member Author

@pragnagopa I think it makes more sense for someone on the functions team to make this fix

@JoshLove-msft JoshLove-msft removed their assignment Sep 13, 2024
@JoshLove-msft JoshLove-msft added the Service Attention Workflow: This issue is responsible by Azure service team. label Sep 13, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @EldertGrootenboer @shankarsama.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. Functions needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

3 participants