Memory problem with meteorite (mup) on Digital Ocean

I can not find existing messages related to my problem. On Digital Ocean Droplet, the mup setup went fine, but when I try to deploy, I get the following error. Any ideas? Thanks!

root@ts :~/ts-deploy# mup deploy Meteor Up: Production Quality Meteor Deployments Building Started: /root/TS/ Bundling Error: code=137, error: -------------------STDOUT------------------- Figuring out the best package versions to use. This may take a moment. -------------------STDERR------------------- bash: line 1: 31217 Killed meteor build --directory /tmp/dc37af3e-eca0-4a19-bf1a-d6d38bb8f517 

The following are the logs. node -v indicates that I am using 0.10.31. How to check which of the script exits with an error? Any other ideas? Thanks!

 error: Forever detected script exited with code: 1 error: Script restart attempt #106 Meteor requires Node v0.10.29 or later. error: Forever detected script exited with code: 1 error: Script restart attempt #107 Meteor requires Node v0.10.29 or later. error: Forever detected script exited with code: 1 error: Script restart attempt #108 stepping down to gid: meteoruser stepping down to uid: meteoruser 

After I returned to the old DO Droplet backup and restarted mup setup and mup deploy, now I get this in the command line output

 Building Started: /root/TS Bundling Error: code=134, error: -------------------STDOUT------------------- Figuring out the best package versions to use. This may take a moment. -------------------STDERR------------------- FATAL ERROR: JS Allocation failed - process out of memory bash: line 1: 1724 Aborted (core dumped) meteor build --directory /tmp/bfdbcb45-9c61-435f-9875-3fb304358996 

and this is in the logs:

  >> stepping down to gid: meteoruser >> stepping down to uid: meteoruser Exception while invoking method 'login' TypeError: Cannot read property '0' of undefined at ServiceConfiguration.configurations.remove.service (app/server/accounts.js:7:26) at Object.Accounts.insertUserDoc (packages/accounts-base/accounts_server.js:1024) at Object.Accounts.updateOrCreateUserFromExternalService (packages/accounts-base/accounts_server.js:1189) at Package (packages/accounts-oauth/oauth_server.js:45) at packages/accounts-base/accounts_server.js:383 at tryLoginMethod (packages/accounts-base/accounts_server.js:186) at runLoginHandlers (packages/accounts-base/accounts_server.js:380) at Meteor.methods.login (packages/accounts-base/accounts_server.js:434) at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1594) at packages/ddp/livedata_server.js:648 Exception while invoking method 'login' TypeError: Cannot read property '0' of undefined at ServiceConfiguration.configurations.remove.service (app/server/accounts.js:7:26) at Object.Accounts.insertUserDoc (packages/accounts-base/accounts_server.js:1024) at Object.Accounts.updateOrCreateUserFromExternalService (packages/accounts-base/accounts_server.js:1189) at Package (packages/accounts-oauth/oauth_server.js:45) at packages/accounts-base/accounts_server.js:383 at tryLoginMethod (packages/accounts-base/accounts_server.js:186) at runLoginHandlers (packages/accounts-base/accounts_server.js:380) at Meteor.methods.login (packages/accounts-base/accounts_server.js:434) at maybeAuditArgumentChecks (packages/ddp/livedata_server.js:1594) at packages/ddp/livedata_server.js:648 
+2
source share
2 answers

The memory issue is related to using DigitalOcean $ 5 Droplet. To solve this problem, I added swap to the server, as explained in detail below.

Create and enable the swap file using the dd command:

 sudo dd if=/dev/zero of=/swapfile bs=1024 count=256k 

"of = / swapfile" denotes the file name. In this case, this is the page file.

Then prepare the swap file by creating the linux swap area:

 sudo mkswap /swapfile 

Results show:

 Setting up swapspace version 1, size = 262140 KiB no label, UUID=103c4545-5fc5-47f3-a8b3-dfbdb64fd7eb 

Exit by activating the page file:

 sudo swapon /swapfile 

After viewing the swap, you can see the new swap file.

 swapon -s Filename Type Size Used Priority /swapfile file 262140 0 -1 

This file will last on the virtual private server until the computer restarts. You can guarantee that the exchange will be permanent by adding it to the fstab file.

Open the file:

 sudo nano /etc/fstab 

Paste in the following line:

  /swapfile none swap sw 0 0 

Happiness in the file should be set to 10. Skipping this step can lead to poor performance, while setting it to 10 will cause swap to act as an emergency buffer, preventing out-of-memory crashes.

You can do this with the following commands:

 echo 10 | sudo tee /proc/sys/vm/swappiness echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf To prevent the file from being world-readable, you should set up the correct permissions on the swap file: sudo chown root:root /swapfile sudo chmod 0600 /swapfile 
+8
source

This only worked for me, increasing the swap space to 1gb:

 Make all swap off sudo swapoff -a Resize the swapfile sudo dd if=/dev/zero of=/swapfile bs=1M count=1024 Make swapfile usable sudo mkswap /swapfile Make swapon again sudo swapon /swapfile 
0
source

Source: https://habr.com/ru/post/1202453/


All Articles