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

Asp.net Core web app doesn't throw any exception when feature flag free quota limit is reached #170

Closed
jimmyca15 opened this issue Jun 8, 2020 · 1 comment
Labels
question Further information is requested

Comments

@jimmyca15
Copy link
Member

This is moved from microsoft/FeatureManagement-Dotnet#70 on behalf of @SailleshPawar

Original issue below


This is something that we faced in production recently.
Accidentlally we were using Free tier of App Configuration in production workload for our web app.
We were deploying the new changes in the production environment and we were getting 500.30 service unavailable error, when we were trying to access the API's
We tried running the command *dotnet .dll from kudu using dotnet .dll command and it just hangs doesn't show any error in console.
At last we tested on local env and found it was due to feature flag free quota limit is reached application was not running and no exception was shown in console, making it hard to understand what is the root cause of the issue.

below is our code for program.cs

`{

                 var builtConfig = builder.Build();

                 var azureServiceTokenProvider = new AzureServiceTokenProvider();

                 var keyVaultClient = new KeyVaultClient(
                     new KeyVaultClient.AuthenticationCallback(
                         azureServiceTokenProvider.KeyVaultTokenCallback));

                 builder.AddAzureKeyVault(
                     $"https://{builtConfig["KeyVaultName"]}.vault.azure.net/",
                     keyVaultClient,
                     new DefaultKeyVaultSecretManager());

             })

            .ConfigureAppConfiguration((ctx, builder) =>
            {
                var builtConfig = builder.Build();
                builder.AddAzureAppConfiguration(options => {
                    options.Connect(builtConfig["feature-flag-connection-string"])
                        .UseFeatureFlags();
                });
            })`
@zhenlan
Copy link
Contributor

zhenlan commented Jul 20, 2020

When a store reached the limit and is being throttled, the application will not be able to connect to App Configuration at startup (after retries), so it will throw an exception. The exception should include information on the reason for the failure (being throttled). Given that 500 is observed when the application was running in an App Service web app, the API behaved as expected. In terms of debugging, it's the same experience when an application failed to start in the web app for any other reason.

@zhenlan zhenlan added the question Further information is requested label Jul 20, 2020
@zhenlan zhenlan closed this as completed Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants