Hi Petri Lipponen,
that 503 error on deployment while the function app itself keeps running is super frustrating )) especially when it comes and goes unpredictably like you're experiencing. This usually points to issues with the underlying app service platform rather than your code.
The 503 on the scm.azurewebsites.net endpoint suggests the Kudu deployment engine is having problems. This could be due to platform updates, resource constraints, or backend service issues in your region.
Check the function app's platform settings. Make sure you're running on the same platform (32-bit vs 64-bit) as before, and verify the Python version is still correctly set to 3.11. Sometimes platform updates can reset these settings.
Try scaling your function app plan up temporarily, then back down. If you're on a consumption plan, switch to a premium or dedicated plan briefly, then switch back. This can sometimes reset the underlying compute instances and clear deployment issues.
The Azure Functions troubleshooting guide has specific steps for deployment issues https://free.blessedness.top/en-us/azure/azure-functions/functions-recover-storage-account.
Also check your application settings, particularly any WEBSITE_* settings. Sometimes corrupted application settings can cause deployment failures even though the runtime continues working.
Another approach is to use the Run From Package deployment method instead of direct code deployment. This involves deploying your function as a zip package to blob storage and having the function app load from there. It's often more reliable than direct file deployment.
You can also try deploying to a completely new function app in a different region. If that works, it suggests there might be a regional platform issue affecting your original function app.
If you're using deployment slots, try deploying directly to the production slot temporarily to see if the issue is slot-specific or affects the entire function app.
For immediate debugging, check the function app's log stream while attempting deployment. Even though the deployment fails, you might see error messages in the logs that give clues about what's failing in the backend.
Hope this helps you get deployments working again
regards,
Alex
and "yes" if you would follow me at Q&A - personaly thx.
P.S. If my answer help to you, please Accept my answer