Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows环境 instanceLifecycleConfig http触发后报错. #12

Open
duanrui71 opened this issue Aug 12, 2024 · 0 comments
Open

Windows环境 instanceLifecycleConfig http触发后报错. #12

duanrui71 opened this issue Aug 12, 2024 · 0 comments

Comments

@duanrui71
Copy link

nodejs 版本:16 18 20 均尝试过
触发方式: http
在 s.yaml 中的配置:
instanceLifecycleConfig:
preStop:
handler: index.pre_stop
timeout: 3
initializer:
handler: index.initializer
timeout: 3
运行命令:
's local start'
启动后访问 localhost:9001

后台报如下错误:
Aliyun FunctionComputer runtime emulator start.
You can use curl or Postman to make an HTTP request to localhost:9001 to test the function
2024-08-12T17:40:10Z [ERROR] [fc-rie] runtime exited because of signal: segmentation fault
stderr log is:
2024-08-12T17:40:13Z [ERROR] [fc-rie] fail to get memory usage, fail to read memory usage, open /sys/fs/cgroup/docker/57937d16be48a02d9d62d87ce8ada8e3927c43c3f8105e086c0925445775ca5d/memory.current: no such file or directory

前端返回错误:
{"errorMessage":"Function timed out after 3 seconds (maxMemoryUsage: -1MB)"}

一些说明:
无论initializer函数在, index.js 中是否定义均会报错.
去掉initializer函数说明后, handler 函数调用正常.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant