超过了软私有内存限制

huangapple go评论91阅读模式
英文:

Exceeded soft private memory limit

问题

我们对gae go有一个糟糕的经历。当我们的应用是免费的时候,我们从来没有遇到过超过软私有内存限制的问题。我们超过配额后决定付费。我们的每日预算设定为3美元。付费服务激活后,我们能够再次使用该网站,并且超额配额问题消失了。几个小时后,我们遇到了超过软私有内存限制的问题,无法再看到其他内容。我尝试清除数据存储中的一些大数据,禁用内置功能,但仍然没有运气。

我在代码中进行了一些测试,以确定错误的来源。删除数据存储访问代码后,网站恢复正常。所以我的结论是,即使只是获取很少的实体,访问数据存储也会引发这样的错误。我们有点绝望。我们选择使用appspot来利用这项技术,但我们遇到了这个问题,无法继续开发。

以下只是引发此类错误的代码。

q := datastore.NewQuery("Course")
    courses := make([]courseData, 0)
    if keys, err := q.GetAll(c, &courses); err != nil {
        http.Error(w, err.Error(), http.StatusInternalServerError)
        return
    } else {
      for i := range courses {                 
          courses[i].Key = keys[i]
      }                           
    }

非常感谢您能为我们提供任何帮助。提前谢谢您。

英文:

We have a terrible experience with gae go. When our app was a free one, we never had problem with Exceeded soft private memory limit. We hit over quota thus we decided to pay. Our daily budget is set to $3. After the activation of the paid service, we were able to use the site again and the over quota was gone away. Few hours later, we got this Exceeded soft private memory limit and could no longer see anything but this. I have tried to clear few big data in datastore, disable the built ins and still no luck.

I made some test in the code as to where the fault is coming from. Removing the datastore access code, made the site up again. So my conclusion is accessing datastore even just to fetch very few entities would raised an error like this. We a bit hopeless. We opted to use appspot to leverage the technology but we get this asn we cant move on to the development.

Below is just the code that raise this kind of error.

q := datastore.NewQuery("Course")
    courses := make([]courseData, 0)
    if keys, err := q.GetAll(c, &courses); err != nil {
        http.Error(w, err.Error(), http.StatusInternalServerError)
        return
    } else {
      for i := range courses {                 
          courses[i].Key = keys[i]
      }                           
    }

Any help that you could extend to us would be highly appreciated. Thank you in advance.

答案1

得分: 3

根据我的经验,这个消息通常意味着您的实例使用的内存超过了实例类支持的内存。如果您开始收到这个消息,请升级到下一个实例类(F2等),看看问题是否消失。这是在您的模块配置文件中进行的更改(以前在管理控制台的应用程序设置部分)。除非您使用的内存超过下一个类别的支持范围,否则问题很可能会消失。

与其他根据预算限制自动扩展的资源不同,RAM不会自动扩展;如果一个请求导致实例超过其实例类的RAM限制,该实例将在请求结束时终止,并记录此消息。

英文:

In my experience this message usually means that your instances use more memory than your instance class supports. If you start getting this message upgrade to the next instance class (F2, etc) and see if it goes aways. This is a change that you do in your module configuration file (used to be in the management console at the Applications Settings section). Most likely the problem will go away, unless of course you are using more memory than the next class can support.

Unlike other resources that scale automatically to your budget limits, RAM is not; if a request causes an instance to exceed the RAM limit of its instance class, the instance is terminated at the end of the request and this message is logged.

huangapple
  • 本文由 发表于 2013年3月21日 03:45:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/15533248.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定