Meteor 错误消息:“无法接收保活!退出." [英] Meteor error message: "Failed to receive keepalive! Exiting."

查看:20
本文介绍了Meteor 错误消息:“无法接收保活!退出."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始构建一个新的 Meteor 应用程序.到目前为止,我所做的唯一一件事就是添加一个 Collection.它将启动,运行正常约 5 分钟,然后给我错误消息无法接收 keepalive!退出."

I am just starting to build a new Meteor app. The only thing I have done so far is add one Collection. It will start, run fine for about 5 minutes, and then give me the error message "Failed to receive keepalive! Exiting."

无法从什么接收keepalive?我认为这与 Mongo 有关,因为这是我添加的唯一内容.谷歌搜索错误消息,除了 Meteor 网站只显示此错误消息而不是他们的应用程序.

What is failing to receive keepalive from what? I assume this has something to do with Mongo since that is the only thing I have added. Googling the error message turns up nothing except Meteor sites that are just showing this error message instead of the their app.

我的 MongoDB 集合中已经有不是由 Meteor 创建的数据,如果有任何不同的话,它超过 4GB.

My MongoDB collection already had data in it that was not created by Meteor and it is over 4GB if that makes any difference.

这是完整的应用程序.

pitches_sum = new Meteor.Collection( 'pitches_sum' );

if (Meteor.is_client) {
  Template.hello.greeting = function () {
  return "Welcome to my site.";
  };

  Template.hello.events = {
    'click input' : function () {
      // template data, if any, is available in 'this'
      if (typeof console !== 'undefined')
        console.log("You pressed the button");
    }
  };
}

if (Meteor.is_server) {
  Meteor.startup(function () {
  console.log( '**asdf**' );        
  });
}

如果我注释掉 pitches_sum = new Meteor.Collection('pitches_sum'); 行,那么我认为我不会再收到错误消息了.

If I comment out the pitches_sum = new Meteor.Collection( 'pitches_sum' ); line, then I don't think I will get the error message any more.

推荐答案

这是由我的大数据集和自动发布引起的.由于启用了自动发布,Meteor 试图将整个 4GB 集合发送给客户端.尝试处理所有数据阻止客户端响应服务器的保持活动 ping.或者类似的东西.

This was being caused by my large data set and autopublish. Since autopublish was on, Meteor was trying to send the whole 4GB collection down to the client. Trying to process all the data prevented the client from responding to the server's keep alive pings. Or something to that effect.

使用 meteor remove autopublish 删除自动发布,然后编写我自己的发布和订阅功能解决了问题.

Removing autopublish with meteor remove autopublish and then writing my own publish and subscribe functions fixed the problem.

这篇关于Meteor 错误消息:“无法接收保活!退出."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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