Unfortunately, I have an issue: I run Node.js inside the containers for my build and it always crashes with JavaScript heap out of memory
although I have set then env variable NODE_OPTIONS: "--max_old_space_size=8048"
.
As you can see, I even set more swap space and the env variable twice.
{
total_heap_size: 3960832,
total_heap_size_executable: 524288,
total_physical_size: 3154768,
total_available_size: 4166532276,
used_heap_size: 2419216,
heap_size_limit: 4169138176,
malloced_memory: 131164,
peak_malloced_memory: 320576,
does_zap_garbage: 0,
number_of_native_contexts: 1,
number_of_detached_contexts: 0
}
{
_: '/usr/bin/node',
GITHUB_WORKSPACE: '/home/runner/work/redacted/redacted',
PATH: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
GITHUB_WORKFLOW: 'Debug',
GITHUB_RUN_NUMBER: '6',
GITHUB_EVENT_NAME: 'push',
GITHUB_REPOSITORY: 'redacted/redacted',
SHLVL: '1',
GITHUB_JOB: 'build_qemu',
TERM: 'xterm',
GITHUB_BASE_REF: '',
RUNNER_OS: 'Linux',
GITHUB_GRAPHQL_URL: 'https://api.github.com/graphql',
GITHUB_EVENT_PATH: '/home/runner/work/_temp/_github_workflow/event.json',
GITHUB_SERVER_URL: 'https://github.com/',
GITHUB_RUN_ID: 'redacted',
GITHUB_SHA: 'redacted',
GITHUB_REF: 'refs/heads/main',
RUNNER_WORKSPACE: '/home/runner/work/redacted',
DEBIAN_FRONTEND: 'noninteractive',
GITHUB_ENV: '/home/runner/work/_temp/_runner_file_commands/set_env_redacted',
RUNNER_TEMP: '/home/runner/work/_temp',
HOME: '/root',
PWD: '/home/runner/work/redacted/redacted',
GITHUB_ACTION: 'build',
GITHUB_ACTOR: 'hrueger',
GITHUB_HEAD_REF: '',
CI: 'true',
GITHUB_ACTIONS: 'true',
RUNNER_TOOL_CACHE: '/opt/hostedtoolcache',
GITHUB_API_URL: 'https://api.github.com/',
NODE_OPTIONS: '--max_old_space_size=8048',
HOSTNAME: 'd6d6e1f2994f'
}
It seems like the memory available inside the contianer / qemu is only 4 GB, because the env variable is passed correctly.