From 92cd2a3d0e6554b44acc7cfd9f369d616eecebdf Mon Sep 17 00:00:00 2001 From: fengmk2 Date: Thu, 3 Jul 2025 18:39:34 +0800 Subject: [PATCH] chore(server): use jemalloc to reduce RSS (#13001) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close CLOUD-236 #### PR Dependency Tree * **PR #13001** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) ## Summary by CodeRabbit * **Chores** * Updated system configuration to preload jemalloc for improved memory management in the Node.js application. --- .github/deployment/node/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/deployment/node/Dockerfile b/.github/deployment/node/Dockerfile index 353642f9ab..9555c940c7 100644 --- a/.github/deployment/node/Dockerfile +++ b/.github/deployment/node/Dockerfile @@ -7,7 +7,10 @@ COPY ./packages/frontend/apps/mobile/dist /app/static/mobile WORKDIR /app RUN apt-get update && \ - apt-get install -y --no-install-recommends openssl && \ + apt-get install -y --no-install-recommends openssl libjemalloc2 && \ rm -rf /var/lib/apt/lists/* +# Enable jemalloc by preloading the library +ENV LD_PRELOAD=libjemalloc.so.2 + CMD ["node", "./dist/main.js"]