Skip to content

Commit 9328073

Browse files
fix: disable wasm trap handler to avoid memory exhaustion
by default wasm allocates 10GB virtual memory cage which too big for current scone heap (1GB) https://github.com/nodejs/node/blob/v24.4.1/doc/changelogs/CHANGELOG_V20.md#cli-allow-running-wasm-in-limited-vmem-with---disable-wasm-trap-handler
1 parent b07b9b1 commit 9328073

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/dapp-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
docker-registry: docker.io
6464
sconify-version: '5.9.0-v15'
6565
binary: /usr/local/bin/node
66-
command: node /app/src/app.js
66+
command: node
6767
host-path: |
6868
/etc/hosts
6969
/etc/resolv.conf

.github/workflows/dapp-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
docker-registry: docker.io
4545
sconify-version: '5.9.0-v15'
4646
binary: /usr/local/bin/node
47-
command: node /app/src/app.js
47+
command: node
4848
host-path: |
4949
/etc/hosts
5050
/etc/resolv.conf

dapp/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM node:20-alpine3.22
1+
FROM node:20.19-alpine3.22
22
WORKDIR /app
33
COPY package*.json ./
44
RUN npm ci --production
55
COPY ./src .
6-
ENTRYPOINT [ "node", "/app/app.js"]
6+
ENTRYPOINT [ "node", "--disable-wasm-trap-handler", "/app/app.js" ]

deployment-dapp/src/singleFunction/deployApp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const deployApp = async ({
2727
const mrenclave = {
2828
framework: 'SCONE' as any, // workaround framework not auto capitalized
2929
version: 'v5.9',
30-
entrypoint: 'node /app/app.js',
30+
entrypoint: 'node --disable-wasm-trap-handler /app/app.js',
3131
heapSize: 1073741824,
3232
fingerprint,
3333
};

0 commit comments

Comments
 (0)