Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exceeded soft private memory limit

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.

like image 411
sagit Avatar asked Oct 22 '22 14:10

sagit


1 Answers

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.

like image 186
gae123 Avatar answered Oct 25 '22 17:10

gae123