2

I couldn't find existing posts related to my issue. On a Digital Ocean Droplet, 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

Below are the logs. node -v indicates I am using 0.10.31. How do I check which script is exiting with the 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 went back to an old backup of the DO Droplet, and re-ran mup setup and mup deploy, I now 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 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
4

2 回答 2

9

内存问题源于使用 DigitalOcean 的 5 美元 Droplet。为了解决这个问题,我在服务器上添加了交换,如下文详细解释。

使用 dd 命令创建并启用交换文件:

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

“of=/swapfile”指定文件名。在这种情况下,名称是交换文件。

接下来通过创建一个 linux 交换区来准备交换文件:

sudo mkswap /swapfile

结果显示:

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

通过激活交换文件完成:

sudo swapon /swapfile

然后,当您查看交换摘要时,您将能够看到新的交换文件。

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

此文件将在虚拟专用服务器上持续存在,直到机器重新启动。您可以通过将交换添加到 fstab 文件来确保交换是永久性的。

打开文件:

sudo nano /etc/fstab

粘贴到以下行:

 /swapfile       none    swap    sw      0       0 

文件中的 Swappiness 应设置为 10。跳过这一步可能会导致性能不佳,而将其设置为 10 将导致 swap 充当紧急缓冲区,防止内存不足崩溃。

您可以使用以下命令执行此操作:

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
于 2014-10-07T08:29:42.433 回答
0

这仅通过将交换空间增加到 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
于 2016-04-25T03:00:53.407 回答