Open Marc-fra76 opened 1 month ago
@Marc-fra76 Thanks for submitting this, but it seems this is not an azurerm provider issue. Seems to be an Azure capacity issue. Have you tried using a different region? Sometimes it also helps using a different SKU. The code does not show which application plan you are using.
@Marc-fra76 Thanks for submitting this, but it seems this is not an azurerm provider issue. Seems to be an Azure capacity issue. Have you tried using a different region? Sometimes it also helps using a different SKU. The code does not show which application plan you are using.
This problem appeared after I have upgraded the azurerm provider version. I was able to deploy two times with this upgrade on our staging environment before doing it on our production environnement. I also have opened an azure ticket to try to find out where the problem occurs. Their reply are simple : deploy less app services at once, make a more sequential deployement, eventually split them on multiple app service plan.
I'm still using the 3.38.0 version on another infra for the moment, and I don't have this problem. I had planned to upgrade it too, but at the moment, I'm not willing to do it.
The app service plan sku is P2V3 with normally allow the use of 32 app services. I have only 20 app services on it, and simply updating 6 of them give me this result.
I have also added the lifecycle > ignore_changes part to reduce the updates on the app services at each plan. I made this change after reading this issue https://github.com/hashicorp/terraform-provider-azurerm/issues/22879 But it didn't changes much. I have just reduced the number of app services to be updated from all to just the one requested.
Is there an existing issue for this?
Community Note
Terraform Version
1.3.3
AzureRM Provider Version
3.97.1
Affected Resource(s)/Data Source(s)
azurerm_linux_web_app
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Deploy an updated image to the app service to all the instances of the app service plan used by the app service
Actual Behaviour
After upgrading the azurerm provider from version 3.38.0 to 3.97.1, I run into unstable app services after deployement. I had to increase the app service plan instances to at least 2 in order to keep our app services up.
The deployement went fine, but the app service is detected as unhealthy on one instance. This unhealthy state takes around two hours to be resolved automatically by the system. During this unhealthy state, several instances are created (around 10 instances) and each tries to start the application.
Here is the memory usage graph of our last deployement:![memory_usage_per_instance](https://github.com/user-attachments/assets/ea0be9d3-5e3b-449f-9c2b-55e3162500a9)
Steps to Reproduce
simply apply a new image update on an existing app service
Important Factoids
No response
References
No response