Skip to content

部署问题-容器故障 #132

Description

@zhuyifeiRuichuang

部署时,在物理机存在偶发失败的情况,

日志

@buildingai/wechat-sdk:build: > rimraf dist && tsc -p tsconfig.build.json
@buildingai/wechat-sdk:build: 
@buildingai/db:build: cache miss, executing 47f98d672ece4b11
@buildingai/ai-toolkit:build: cache miss, executing 37dfda474fed14e7
@buildingai/ai-toolkit:build: 
@buildingai/ai-toolkit:build: > @buildingai/[email protected] build /buildingai/packages/@buildingai/ai-toolkit
@buildingai/ai-toolkit:build: > rimraf dist && tsc -p tsconfig.build.json
@buildingai/ai-toolkit:build: 
@buildingai/db:build: 
@buildingai/db:build: > @buildingai/[email protected] build /buildingai/packages/@buildingai/db
@buildingai/db:build: > rimraf dist && tsc -p tsconfig.build.json && pnpm run copy:data
@buildingai/db:build: 
@buildingai/db:build:  ELIFECYCLE  Command failed with exit code 129.
@buildingai/ai-toolkit:build:  ELIFECYCLE  Command failed with exit code 129.
@buildingai/db:build: ERROR: command finished with error: command (/buildingai/packages/@buildingai/db) /buildingai/.pnpm-store/v11/links/@/pnpm/10.20.0/e282995113aa7971d1dacd3e1f779dacbcd775943486ca678a61e2723cded71a/bin/pnpm run build exited (129)
@buildingai/db#build: command (/buildingai/packages/@buildingai/db) /buildingai/.pnpm-store/v11/links/@/pnpm/10.20.0/e282995113aa7971d1dacd3e1f779dacbcd775943486ca678a61e2723cded71a/bin/pnpm run build exited (129)

 Tasks:    14 successful, 16 total
Cached:    11 cached, 16 total
  Time:    30.803s 
Failed:    @buildingai/db#build

 ERROR  run failed: command  exited (129)
 ELIFECYCLE  Command failed with exit code 129.
[Build] Project build failed: Command execution failed with exit code: 129
[Setup] Predeploy failed: Command execution failed with exit code: 1
 ELIFECYCLE  Command failed with exit code 1.
 ELIFECYCLE  Command failed with exit code 1.
(base) 
root@app1 Thu Jul 23 [03:29:06] : /opt/buildingai
# docker inspect buildingai-nodejs \
--format='ExitCode={{.State.ExitCode}}
Error={{.State.Error}}
OOMKilled={{.State.OOMKilled}}
FinishedAt={{.State.FinishedAt}}'
ExitCode=1
Error=
OOMKilled=false
FinishedAt=2026-07-23T03:25:01.701289878Z
(base) 
root@app1 Thu Jul 23 [03:29:35] : /opt/buildingai
# 
(base) 
root@app1 Thu Jul 23 [03:29:36] : /opt/buildingai
# docker compose ps -a
NAME                  IMAGE                                             COMMAND                  SERVICE    CREATED          STATUS                     PORTS
buildingai-nodejs     ccr.ccs.tencentyun.com/buildingai/node:22.20.0    "docker-entrypoint.s…"   nodejs     11 minutes ago   Exited (1) 7 minutes ago   
buildingai-postgres   ccr.ccs.tencentyun.com/buildingai/postgres:17.6   "docker-entrypoint.s…"   postgres   11 minutes ago   Up 11 minutes (healthy)    0.0.0.0:32771->5432/tcp, [::]:32771->5432/tcp
buildingai-redis      ccr.ccs.tencentyun.com/buildingai/redis:8.2.2     "docker-entrypoint.s…"   redis      11 minutes ago   Up 11 minutes (healthy)    0.0.0.0:32770->6379/tcp, [::]:32770->6379/tcp
(base) 
root@app1 Thu Jul 23 [03:32:19] : /opt/buildingai
# 
  1. 为什么这个容器需要在部署阶段构建,是否应当改为构建容器镜像时构建,部署时仅运行。
  2. 换到云主机,部署就成功了,物理机的资源很大,空余内存12G可用,CPU剩余60%可用,存储空间剩余1TB

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions