在单核上运行Meteor应用程序 [英] Running Meteor Application on a Single Core

查看:56
本文介绍了在单核上运行Meteor应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在远程主机上运行流星应用程序.该应用程序可以在我的桌面上运行,但是当我在远程主机上运行它时,流星进程要么被杀死,要么被冻结.这是几个遇到此问题的命令:

I am trying to run a meteor app on a remote host. The application works on my desktop, but when I run it on the remote host the meteor processes are either killed or they freeze. Here are a couple commands that are experiencing this issue:

流星流星更新流星重启

每个命令在发生故障时占用大约99%的cpu,因此我怀疑Ubuntu正在终止该进程.我相信升级CPU将解决这些问题,但是我想在购买任何东西之前先征求其他意见.

Each command is taking up about 99% of the cpu at the time of failure, so I suspect Ubuntu is killing the process. I believe that upgrading the CPU will fix these issues, but I want to get a second opinion before I buy anything.

我正在使用以下CPU规格的服务器上运行该应用程序:

I am running the application on a server with the following CPU specs:

型号名称:Intel(R)Xeon(R)CPU E5-2630L v2 @ 2.40GHz踏步:4微码:0x1cpu兆赫:2399.998缓存大小:15360 KB物理编号:0兄弟姐妹:1核心编号:0cpu核心数:1

另外,是运行 meteor 命令时的输出:

Additionally, is the output when running the meteor command:

[[[[[[/HELPq]]]]]
=>启动代理.
=>启动了MongoDB.
意外的mongo退出代码为null.重新启动.

针对web.browser的Killedlding

最后一行显示 Building for web.browser ,但被 Killed 输出部分覆盖.

The last line says Building for web.browser, but is partially overwritten by the Killed output.

推荐答案

您不应以这种方式运行Meteor.基本上,当您的shell超时时,流星进程将被杀死.您需要将其与远程登录分离.

You shouldn't be running Meteor this way. Basically when your shell times out the meteor process will be killed. You need to detach it from the remote login.

有很多方法可以做到这一点.

There are a number of ways to do it.

第一步是进行流星构建",生成一个捆绑包,并将其压缩以准备转移到主机上

The first step will be to do a 'meteor build', which will produce a bundle, and zip it up ready for transfer to the host

1)Nginx和Phusion乘客这是我的建议,因为我发现它非常容易设置和维护,并且还要在多个Meteor服务器之间共享一个IP地址(就像Apache在虚拟主机上一样).在他们的网站上有一个出色的向导,可引导您完成安装和设置 https://www.phusionpassenger.com/library/install/nginx/install/oss/

1) Nginx and Phusion Passenger This is my recommendation, as I have found it very easy to set up and maintain, and it also looks after sharing one IP address among several Meteor servers (much like Apache does with virtual hosts). There is an excellent wizard on their site which leads you through installation and setup https://www.phusionpassenger.com/library/install/nginx/install/oss/

2)永远如果您仅运行一台服务器并且有更简单的需求,那么永远都可以.这对于运行nodejs服务器(流星服务器就是这样)也很有用. https://github.com/foreverjs/forever

2) Forever If you are only running one server and have simpler needs, forever will do. It's also useful for running nodejs servers (which is what meteor server is). https://github.com/foreverjs/forever

3)Mup将允许您一步发布到自己的服务器上 https://github.com/kadirahq/meteor-up

3) mup will allow you a one step publish to your own server https://github.com/kadirahq/meteor-up

4)Galaxy托管.也许更昂贵,但是它再次为您提供了一步发布选项. https://www.meteor.com/hosting

4) Galaxy hosting. Perhaps more expensive, but again it gives you a one step publish option. https://www.meteor.com/hosting

Galaxy和Mup的工作量最少,因为它们几乎是一个黑匣子.出现问题时进行故障排除可能会更加困难.我喜欢nginx解决方案,因为您拥有细粒度的控件,但设置确实非常简单.

Galaxy and mup are the least amount of effort, as they are very much a black box. Trouble shooting when things go wrong can be harder. I like the nginx solution because you have fine grained control and yet setup is really simple.

这篇关于在单核上运行Meteor应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆