One reason might be that you don't really need all that memory, but because
you're holding references to not-needed variables, the garbage collector
can't reclaim it.  An easy way to avoid this is to break up the task
executing on the backend into multiple smaller tasks that you manage
through the use of task queues.  If you're convinced you need all that
memory, you can consider changing your backend to a higher class (B1 has
only 128MB memory, but B2, B3.. etc, allow you to use more at a higher
cost).  You could temporarily use a higher class while you figure out how
to lower your memory foot-print, either through code changes or through
breaking up tasks.

On Fri, Nov 18, 2011 at 8:42 AM, Andrius A <[email protected]> wrote:

> Are there any ways to recycle memory while running? Or does it mean I need
> to run one with more memory?
> On Nov 18, 2011 1:36 PM, "Eduardo Perrino" <[email protected]>
> wrote:
>
>> Hi,
>>
>> Safely you've exceed the backend's memory.
>>
>>
>> 2011/11/18 Andrius A <[email protected]>
>>
>>> I am running backend started by the task which starts a loop within a
>>> backend to keep it running.
>>> I am constantly seeing backend restarting recently, no exceptions
>>> visible on the logs apart from these errors:
>>>
>>>
>>>
>>>    1.  2011-11-18 09:36:38.480 /app/executor/master/ 500 3654275ms 0kb
>>>    instance=0 AppEngine-Google; (+http://code.google.com/appengine)
>>>
>>>    0.1.0.2 - - [18/Nov/2011:01:36:38 -0800] "POST /app/executor/master/ 
>>> HTTP/1.1" 500 0 "http://0.master-executor.xxx.appspot.com/_ah/start"; 
>>> "AppEngine-Google; (+http://code.google.com/appengine)" 
>>> "master-executor.xxx.appspot.com" ms=3654275 cpu_ms=5810488 
>>> api_cpu_ms=3602612 cpm_usd=100.072612 queue_name=master-executor-queue 
>>> task_name=master-executor-job-1321599921 exit_code=109 instance=0
>>>
>>>    2.  E2011-11-18 09:36:37.596
>>>
>>>    Connection to client lost.
>>>
>>>
>>>    What does exit_code=109 means?
>>>
>>>
>>>    Thanks for your help!
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google App Engine" group.
>>> To post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-appengine?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Google App Engine" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-appengine?hl=en.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to