maodouio / meteor-lean-startup-camp

毛豆网Meteor精益创业孵化营
63 stars 23 forks source link

同样地服务器 为什么访问速度差别这么大? #39

Closed cobola closed 9 years ago

cobola commented 9 years ago

http://ce.cloud.360.cn/Snapshot?snapshot=652bcc8bbbda9b3966986e62f432c680&url=http://www.meteorbb.com

http://ce.cloud.360.cn/Snapshot?snapshot=94a72e592284c15db0c327323ec98278&url=http://125806.com

第一个是meteor程序 速度很快

第二个是node+express 速度慢

为什么?是360检测方法的问题 还是meteor做了些什么?

kevingzhang commented 9 years ago

我没有这样测试过。更好的方法是看浏览器profile network的数值。我猜测是编译打包成一个大文件速度快吧

cobola commented 9 years ago

多谢kevin

再请教下

http://www.meteorbb.com/img/logo.png

这个图 放在public/img 下 本地测试没问题 传到服务器上 就显示不了图

不明白什么情况

kevingzhang commented 9 years ago

你去 server 的那个目录看一样文件在不在?

cobola commented 9 years ago

/opt/meteorbb/app/programs/web.browser/app/img/logo.png

图片在这个路径下

server下没有

kevingzhang commented 9 years ago

你有什么工具进行的 deploy. 如果是 mup, 把你的 mup.json 发上来看看

cobola commented 9 years ago
{
  // Server authentication info
  "servers": [
    {
      "host": "",
      "username": "",
      “password”:""
      // or pem file (ssh based authentication)
      //"pem": "~/.ssh/id_rsa"

    }
  ],
  // Install MongoDB in the server, does not destroy local MongoDB on future setup
  "setupMongo": false,
  // WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
  "setupNode": false,
  // WARNING: If nodeVersion omitted will setup 0.10.33 by default. Do not use v, only version number.
  "nodeVersion": "0.10.36",
  // Install PhantomJS in the server
  "setupPhantom": false,
  // Application name (No spaces)
  "appName": "meteorbb",
  // Location of app (local directory)
  "app": "/Users/xiangxiang/javacode/meteorbb",
  // Configure environment
  "env": {
    "PORT": 3000,
    "ROOT_URL": "http://www.meteorbb.com",
    "MONGO_URL": "XXXX"
  },
  // Meteor Up checks if the app comes online just after the deployment
  // before mup checks that, it will wait for no. of seconds configured below
  "deployCheckWaitTime": 15
}
kevingzhang commented 9 years ago

setupNode: false 你没有在服务器安装 node 吗? 其他地方没有发现异常情况. 你确认你在  /Us 而是/xiangxiang/javacode/meteorbb/public/img/.... 里面有文件, 但是没有上传到 www.meteorbb.com主机的 /public/img/ 目录中?

我也是这样用的, 没有发现任何问题, 文件都上去了.

cobola commented 9 years ago

服务器已经安装好了node

确认的 同级Img目录下其他文件 还没问题

我也觉得很诡异的 我再研究下..

luckyyang commented 9 years ago

too many days issue, close it for now. If necessary, please reopen it.