全部產品
Search
文件中心

Function Compute:函數執行異常退出,報錯Process exited unexpectedly before completing request怎麼辦?

更新時間:Jul 06, 2024

函數執行異常退出,可能存在以下問題,你可以根據不同問題採取不同的措施。
  • 函數本身邏輯錯誤,多見於下遊資料庫問題,範例程式碼如下。您可以增加日誌功能,根據日誌調試解決。
    # -*- coding: utf-8 -*-
    import os
    
    def handler(event, context):
      os._exit(-1)
      return 'hello world'
  • 如果您的函數是Custom Runtime或者Custom Container函數,可能建立HTTP Server時,Connection未設定為Keep-Alive,且函數的執行逾時時間小於15分鐘。更多資訊,請參見HTTP Server配置要求