All Products
Search
Document Center

Function Compute:What do I do if a function exits unexpectedly and the "Process exited unexpectedly before completing request" message is reported?

Last Updated:Aug 20, 2025

The function exits unexpectedly. The following items describe the possible causes of the error and provide the solutions.
  • The logic of the function is incorrect. This usually occurs in downstream databases. The following example provides the sample code. You can add the logging feature and use the logs to perform debugging and solve the problem.
    # -*- coding: utf-8 -*-
    import os
    
    def handler(event, context):
      os._exit(-1)
      return 'hello world'
  • Keep-alive is not configured when you create an HTTP server in the Custom Runtime or Custom Container and the timeout period for function execution is less than 15 minutes. For more information, see Requirements on HTTP server configurations.