V13 Update failing at the end

Good day all
I decided to take the plunge and update my servers, and yes something did go wrong.

1.Made snapshot of Digital Ocean droplet
2. Created another droplet with that snapshot ( essentially leavind original server intact )
3. bench update
4. all goes well
5. I decided if the update goes well on a copy of the server, it should go without a hitch
on original server
6. I was wrong
7. Update original server … this error occured at the very end…

✔ Built js/control.min.js
✔ Built css/frappe-web-b4.css
✔ Built css/desk.min.css
✔ Built js/desk.min.js
✔ Built css-rtl/printview.css
✔ Built css-rtl/email.css
✔ Built css-rtl/login.css
✔ Built css-rtl/frappe-web-b4.css
✔ Built css-rtl/desk.min.css
✔ Built js/form.min.js
✨  Done in 309.969s

Building erpnext assets...

✔ Built js/erpnext-web.min.js
✔ Built js/bank-reconciliation-tool.min.js
✔ Built js/item-dashboard.min.js
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Traceback (most recent call last):
  File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 110, in <module>
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 20, in main
  File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erpnext/frappe-bench/env/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/utils.py", line 60, in build
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/build.py", line 244, in bundle
    frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
  File "/home/erpnext/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 100, in popen
    raise subprocess.CalledProcessError(return_, command)
subprocess.CalledProcessError: Command '/usr/bin/yarn run production' returned non-zero exit status 137.
[sudo] password for erpnext:
$ sudo supervisorctl restart frappe-bench-workers: frappe-bench-web:
frappe-bench-workers:frappe-bench-frappe-schedule: stopped
frappe-bench-workers:frappe-bench-frappe-long-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-default-worker-0: stopped
frappe-bench-workers:frappe-bench-frappe-short-worker-0: stopped
frappe-bench-web:frappe-bench-node-socketio: stopped
frappe-bench-web:frappe-bench-frappe-web: stopped
frappe-bench-workers:frappe-bench-frappe-schedule: started
frappe-bench-workers:frappe-bench-frappe-default-worker-0: started
frappe-bench-workers:frappe-bench-frappe-short-worker-0: started
frappe-bench-workers:frappe-bench-frappe-long-worker-0: started
frappe-bench-web:frappe-bench-frappe-web: started
frappe-bench-web:frappe-bench-node-socketio: started

Anyone that can give some guidance on this , please. Big please. My servers seem all to be
running. I can access them but I am still worried.

I googled the error …

error Command failed with exit code 137.

and I get hits suggesting “container running out of memory” ???

My request …

  1. Has anyone got some advise to clear this error ?
  2. Can I just re-run bench update ?

Please … if someone can assist I would really appreciate.

Edit note: Droplet is 2CPU ; 4G memory

Update …

Did some further searching …
Found this post …

According to this , my answer is “bench build --force”
I googled “bench build” and it seems to build the JS & CSS files.

I am still wondering if I can simply re-run “bench update”

Please if I can have some ideas / suggestions / anything …

you can (safely) rerun it…maybe use…
bench update --reset
which will also sync the schemas

You don’t have enough memory to complete the build process. Try adding swap or turning freeing up some memory by turning off more demanding processes.

1 Like

Thank you so much @gavindsouza and @trentmu

I have to admit in shame, that I did not check the memory usage … but I restarted my server.
The thought was , that if there was a process hogging some memory, that it would release it.

Then before moving on to bench update --reset.
I re-ran bench update, and all went well.

So I am happy that my servers are all running again !

I appreciate you taking the time !!

1 Like