crm
crm copied to clipboard
Exit code 137 - Out of Memory on bench get-app crm
I am trying to get the crm app using bench get-app crm on my hetzner server having 2 vCPU, 4 GB (RAM), 40 GB (Disk) but I am getting error such as Out of memory: killed process <pid> (node).
What are the possible alternatives to it apart from using frappe cloud and increasing server size. I have not yet tried with bigger server.
@shariquerik What could be the probable reason for it ?
$ /home/frappe/frappe-bench/env/bin/python -m pip install --quiet --upgrade -e /home/frappe/frappe-bench/apps/crm
$ yarn install --check-files
yarn install v1.22.22
[1/4] Resolving packages...
success Already up-to-date.
$ cd frontend && yarn install
yarn install v1.22.22
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.77s.
Done in 10.58s.
$ bench build --app crm
✔ Application Assets Linked
yarn run v1.22.22
$ node esbuild --production --apps crm --run-build-command
File Size
DONE Total Build Time: 425.546ms
Running build command for crm
$ cd frontend && yarn build
$ NODE_OPTIONS='--max-old-space-size=2048' vite build --base=/assets/crm/frontend/ && yarn copy-html-entry
Generated app aliases: [
{
find: '@',
replacement: '/home/frappe/frappe-bench/apps/crm/frontend/src'
}
]
[unplugin-vue-components] component "Section"(/home/frappe/frappe-bench/apps/crm/frontend/src/components/Section.vue) has naming conflicts with other components, ignored.
vite v4.5.5 building for production...
transforming (68) ../node_modules/frappe-ui/src/components/Spinner/index.tsBrowserslist: browsers data (caniuse-lite) is 9 months old. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
transforming (160) src/components/Mobile/MobileAppHeader.vue
Inter-DisplayRegular.woff2?v=3.19 referenced in /home/frappe/frappe-bench/apps/crm/frontend/src/index.css didn't resolve at build time, it will remain unchanged to be resolved at runtime
transforming (1529) ../node_modules/highlight.js/es/languages/gams.js
Inter-DisplayRegular.woff2?v=3.19 referenced in /home/frappe/frappe-bench/apps/crm/frontend/src/index.css?used&inline didn't resolve at build time, it will remain unchanged to be resolved at runtime
✓ 2350 modules transformed.
Export "ImageExtension" of module "../node_modules/frappe-ui/src/components/TextEditor/extensions/image/image-extension.ts" was reexported through module "../node_modules/frappe-ui/src/components/TextEditor/extensions/image/index.ts" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "../node_modules/frappe-ui/src/components/TextEditor/TextEditor.vue?vue&type=script&setup=true&lang.ts" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Command failed: yarn build
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at run_build_command_for_apps (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:453:5)
at execute (/home/frappe/frappe-bench/apps/frappe/esbuild/esbuild.js:125:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 137,
signal: null,
output: [ null, null, null ],
pid: 1167,
stdout: null,
stderr: null
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 114, in <module>
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1442, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/utils.py", line 77, in build
bundle(
File "/home/frappe/frappe-bench/apps/frappe/frappe/build.py", line 255, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 97, in popen
raise subprocess.CalledProcessError(return_, command)
subprocess.CalledProcessError: Command 'yarn run production --apps crm --run-build-command' returned non-zero exit status 1.
ERROR: bench build --app crm
subprocess.CalledProcessError: Command 'bench build --app crm' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in <module>
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/bench/cli.py", line 132, in cli
bench_command()
File "/usr/local/lib/python3.11/site-packages/bench/commands/make.py", line 181, in get_app
get_app(
File "/usr/local/lib/python3.11/site-packages/bench/app.py", line 781, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File "/usr/local/lib/python3.11/site-packages/bench/utils/render.py", line 126, in wrapper_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/bench/app.py", line 253, in install
install_app(
File "/usr/local/lib/python3.11/site-packages/bench/app.py", line 948, in install_app
build_assets(bench_path=bench_path, app=app, using_cached=using_cached)
File "/usr/local/lib/python3.11/site-packages/bench/utils/bench.py", line 404, in build_assets
exec_cmd(command, cwd=bench_path, env=env)
File "/usr/local/lib/python3.11/site-packages/bench/utils/__init__.py", line 184, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app crm
Literally having this issue too. Ironically when i do installed erpnext i dont have any issue
This is not an issue with any other app. Its only an issue with CRM