What do I do if my HTTP server fails to start within 120s?

更新时间:
复制 MD 格式

When a Function Compute instance starts, your HTTP server must be ready to accept requests within 120 seconds. If the server is not ready in time, the instance initialization fails.

Use one or more of the following approaches to resolve this:

Increase the function's memory allocation (recommended)

More memory directly speeds up both initialization and startup. To update the memory setting, go to your function's configuration page and increase the memory size.

Reduce dependency loading at startup

Heavy or deeply nested dependency chains extend initialization time. Avoid loading non-critical modules at startup — defer them until after the server is ready to accept requests.

Optimize your initialization code

Review what runs before the server starts. Move slow operations (such as large data loads or external service calls) out of the startup path where possible.

Note If the issue persists after trying these approaches, join the DingTalk group (ID: 11721331) for technical support.