How to solve Out of memory: Killed process?

The app is nodejs
Here is the logs:

--> You can detach the terminal anytime without stopping the deployment
==> Monitoring deployment

 1 desired, 1 placed, 0 healthy, 1 unhealthy [restarts: 2] [health checks: 1 total, 1 critical]
Failed Instances

Failure #1

56bc4238                8       sin     run     running 1 total, 1 critical     2               2m40s ago

Recent Events
TIMESTAMP               TYPE            MESSAGE                         
2022-06-22T00:11:39Z    Received        Task received by client        
2022-06-22T00:11:39Z    Task Setup      Building Task Directory        
2022-06-22T00:12:12Z    Started         Task started by client         
2022-06-22T00:12:48Z    Terminated      Exit Code: 137                 
2022-06-22T00:12:48Z    Restarting      Task restarting in 1.000105063s
2022-06-22T00:12:57Z    Started         Task started by client         
2022-06-22T00:13:29Z    Terminated      Exit Code: 137                 
2022-06-22T00:13:29Z    Restarting      Task restarting in 1.048454252s
2022-06-22T00:13:37Z    Started         Task started by client         

2022-06-22T00:12:58Z   [info]default Mixed
2022-06-22T00:13:26Z   [info][   29.563498] Out of memory: Killed process 535 (node) total-vm:898936kB, anon-rss:180116kB, file-rss:0kB, shmem-rss:0kB, UID:1000 pgtables:2296kB oom_score_adj:0
2022-06-22T00:13:26Z   [info]Killed
2022-06-22T00:13:26Z   [info]npm ERR! code ELIFECYCLE
2022-06-22T00:13:26Z   [info]npm ERR! errno 137
2022-06-22T00:13:26Z   [info]npm ERR! xxx@0.0.0 start: `node ./bin/www`
2022-06-22T00:13:26Z   [info]npm ERR! Exit status 137
2022-06-22T00:13:26Z   [info]npm ERR!
2022-06-22T00:13:26Z   [info]npm ERR! Failed at the xxx@0.0.0 start script.
2022-06-22T00:13:26Z   [info]npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2022-06-22T00:13:26Z   [info]npm ERR! A complete log of this run can be found in:
2022-06-22T00:13:26Z   [info]npm ERR!     /app/.npm/_logs/2022-06-22T00_13_26_590Z-debug.log
2022-06-22T00:13:27Z   [info]Main child exited normally with code: 137

My app is not big enough

It solved by scale up the VM
But I’m not sure, how the shared cpu works, and which apps under our shared cpu

Hello how did you scale up the VM please ?

Not OP, but try (docs):

# sets 512mb RAM for the app
flyctl scale memory 512 -a <app-name>

See also: flyctl scale vm.