deploying app with NodeJS cloud native buildpack results in error when Base OS image is out of date.
search cancel

deploying app with NodeJS cloud native buildpack results in error when Base OS image is out of date.

book

Article ID: 432667

calendar_today

Updated On:

Products

VMware Tanzu Platform - Cloud Foundry

Issue/Introduction

 

When memory optimization is enabled during build the nodejs buildpack will check for cgroup v1 or v2 compatibility.  If the base OS image does not support either then this error will be observed

2026-03-10T15:25:16.60+0000 [APP/REV/3/PROC/WEB/0] ERR 2026/03/10 15:25:16 open /sys/fs/cgroup/memory/memory.limit_in_bytes: no such file or directory
   2026-03-10T15:25:16.61+0000 [APP/REV/3/PROC/WEB/0] ERR Error: launching failed
   2026-03-10T15:25:16.61+0000 [APP/REV/3/PROC/WEB/0] OUT ERROR: failed launching with self: "web", defaultProc: "web", args: []string(nil), error: exec.d: failed to execute exec.d file at path '/home/vcap/layers/tanzu-buildpacks_node-engine/node/exec.d/0-optimize-memory': exit status 1

 

 

Resolution

workaround

disable memory optimization

Here are a few options you can use.  None is better than the other, it simply depends on how you are deploying.

  • With pack command 
    • pack build my-app --env BP_NODE_OPTIMIZE_MEMORY=false
  • Disable using project.toml 
    • [[io.buildpacks.build.env]]
      name = "BP_NODE_OPTIMIZE_MEMORY"
      value = "false"
  • cf cli
    • cf set-env my-app BP_NODE_OPTIMIZE_MEMORY=false

Fix

Upgrade the Host Base Image that supports cgroups v1 or v2