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

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

问题描述

我才刚刚开始构建一个新的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有关,因为这是我唯一添加的内容.谷歌搜索错误消息只会打开显示此错误消息而不是其应用程序的流星网站.

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.

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

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