Azure Functions Flex Consumption:CLIとHTTP応答は成功するが、ARMの配布状態がRuntimeFailedになる

Morimoto Ryosuke 20 評価のポイント
2026-09-12T14:52:01.86+00:00

Azure Functions Flex Consumptionへの配布について、実際のアプリ動作とARMの配布状態が一致せず、配布完了の判断方法を確認したく質問します。

検証環境はLinux/Node.js 22、Japan East、更新方式はRecreateです。Azure CLI 2.87.0から次の方法で配布しています。

az functionapp deployment source config-zip ... --src <package.zip> --build-remote false

これまでの検証では、CLIは成功で終了し、配布した版で認証付きHTTP処理、SQLへの保存・再読、版別のtelemetryを確認できました。旧版への復旧後も既存データを再読できています。一方、ARMの配布状態では、20分のタイムアウトによるRuntimeFailedが記録されました。

複数回の配布による影響を切り分けるため、同じパッケージを一度だけ配布する追加検証も行いました。

・CLIはexit code 0で終了し、Deployment was successful.と表示されました。

・Flex Consumptionの配布診断では、package upload、worker reset、trigger syncが成功していました。FDM監視はskipと記録されていました。

・ARMの状態はBuildSuccessfulからRuntimeStartingへ進みましたが、instance数は成功・失敗・処理中ともに0でした。

・アプリへの無認証GETは10回とも想定したJSON形式の401を返し、telemetryの件数・status・対象版も一致しました。

・停止後に同じ配布IDを照会すると、RuntimeFailed、ExpectationFailed、extended code 04916、20分のタイムアウトが記録されていました。

なお、追加検証は25分観測する予定でしたが、こちらの観測スクリプトがerrors配列を正しく扱えず、約22分で中断してアプリを停止しました。最後の停止前応答を保存できていないため、RuntimeFailedへの遷移と停止操作の厳密な前後関係は未確認です。

伺いたいのは次の2点です。

  1. Flex ConsumptionのRecreate配布では、CLI・配布診断・対象版のHTTP応答が成功していても、ARMがこのようなRuntimeFailedになる場合があるのでしょうか。FDM監視のskipやinstance数が0のままであることも関係するでしょうか。
  2. この状態で配布・ロールバックの完了を判断するには、どの情報を確認するのが適切でしょうか。実際の配布不成立や一部instanceの問題を見落とさない確認方法を知りたいです。

一般的なデプロイのトラブルシューティングは確認し、アプリ設定も照合済みですが、この状態の解釈は分かりませんでした。参考資料や、追加で確認すべき診断項目をご存じでしたら教えていただけると助かります。

Azure Functions
Azure Functions

イベントドリブンのサーバーレス コンピューティング プラットフォームを提供する Azure サービス。

0 件のコメント コメントはありません

質問作成者が受け入れた回答
Tejaswini Billakurthi 760 評価のポイント Microsoft 外部スタッフ モデレーター
2026-09-14T13:23:13.63+00:00

Hi @Morimoto Ryosuke ,

Thank you for reaching out to Microsoft Q & A !

Your authenticated HTTP and SQL write/read tests, together with version-specific telemetry, show that the deployed version executed successfully for the requests tested. However, they do not establish that every instance is healthy or explain the ARM deployment failure.

For Recreate, Microsoft’s states that there is “No completion signal” and recommends monitoring instance logs to track when the original instances stop emitting logs. This is separate from the reported RuntimeFailed / ExpectationFailed / 04916 after 20 minutes—the documentation does not establish that this failure is expected or harmless.

I haven’t found Microsoft documentation that links this specific failure to FDM monitoring being skipped or the instance counters remaining 0. I would therefore focus the next validation on:

  1. Capture the complete ARM response before stopping the app. Adjust the observation script to handle errors as an array and preserve responses for the same deployment ID, including any failedInstancesLogs. Verify the UTC sequence of the failure and stop operation; the current evidence does not establish their ordering.
  2. Repeat your authenticated HTTP and SQL checks during that same window, particularly after RuntimeFailed appears while the app remains running. Correlate the release identifier and cloud_RoleInstance with startup errors and exceptions. The 10 expected JSON 401 responses validate the rejection path, rather than the authenticated workflow. Instance-log checks can provide additional evidence, but the absence of errors alone does not prove that every instance is healthy.
  3. Use the same validation for rollback, checking the previous release identifier, required configuration, and SQL compatibility. Microsoft’s explains that redeploying previous code does not undo database data or schema changes.

Until the discrepancy is explained, I would record the result as “application checks passed; deployment completion remains unverified”, rather than treating CLI exit code 0 as sufficient.

Could you share the redacted pre-stop ARM response, deployment ID, polling API version, FDM skip log entry, and UTC timeline? Also, do authenticated requests continue to succeed after RuntimeFailed appears? Please remove credentials, connection strings, and signed log URLs before posting.​‌

Please "Upvote the Answer" if this information helped you. This will help us and others in the community as well.

この回答は役に立ちましたか?

1 人がこの回答が役に立ったと思いました。

0 件の追加の回答

並べ替え方法: 古い順

お客様の回答

質問作成者は回答に "承認済み"、モデレーターは "推奨" とマークできます。これにより、ユーザーは作成者の問題が回答によって解決したことを把握できます。