Infinite loop backend gets stuck

233 views
Skip to first unread message

radzish

unread,
May 28, 2011, 10:28:48 AM5/28/11
to Google App Engine
Hi,

I have a backend that is started once on /_ah/start request and just
goes to infinite loop for data processing.

From time to time it gets stuck inside the loop waiting for something
forever.
Problems:
- I can not find a place where it gets stuck. Can someone suggest the
way
I can do this.
- I do not see ability to restart instance programatically. Any ideas?

More information:
- backend is static;
- i have no more infinite loops inside the main loop;
- logging does not help as I have no idea how to log properly in order
to identify the place of stuck

--
Regards,
Alex

Robert Kluin

unread,
May 31, 2011, 1:02:20 AM5/31/11
to google-a...@googlegroups.com
Hi Alex,
What do you mean it 'gets stuck'? Are you able to include / show us any code?

Make sure you checkout the logging flush functions, they'll probably
be helpful.
http://code.google.com/appengine/docs/python/backends/logserviceapi.html

Robert

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

radzish

unread,
Jun 2, 2011, 8:10:42 PM6/2/11
to google-a...@googlegroups.com
Hi,

Thanks for reply. I found reason why it get stuck: it was running out of memory.

I have investigated my code and could not find any reasons of memory leak. Moreover, I created very simple backend that mimics behavior of my original one and still experienced the leak. What I did is i created ckeck for timeout inside my infinite loop and sending 30x error and breaking the loop. This causes instance to restart, releasing memory this way and starting up my loop again.

radzish

unread,
Jun 2, 2011, 8:13:06 PM6/2/11
to google-a...@googlegroups.com
About link with reference to logging api.. Are there anything like this in Java?

Robert Kluin

unread,
Jun 3, 2011, 2:06:27 AM6/3/11
to google-a...@googlegroups.com
Sorry, not I've not got a link to actual docs -- but there is a
mention of it in the Java backends overview:
http://code.google.com/appengine/docs/java/backends/overview.html#Logging

Perhaps that will be of some use...


Robert


On Thu, Jun 2, 2011 at 20:13, radzish <rad...@gmail.com> wrote:
> About link with reference to logging api.. Are there anything like this in Java?
>

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.

> To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/MHpaZmFUOWRzaEFK.

radzish

unread,
Jun 3, 2011, 6:07:18 PM6/3/11
to google-a...@googlegroups.com
Thanks Robin for pointing that out.

That would of course help me with debugging my app.

--
Alex
Reply all
Reply to author
Forward
0 new messages