So then today the log entries for this request started showing the included
message. (this is the first one from 1:52 PDT)  Is this log message a new
feature?  And does it have any ramifications for my app (other than letting
me know that these expensive requests probably shouldn't worry me)?
I construe this as meaning that until my app hits a certain usage frequency
threshold its going to be swapped out and pay a penalty in latency every
time it is reloaded.

Thanks,
04-20 01:52PM 04.157

This request caused a new process to be started for your application,
and thus caused your application code to be loaded for the first time.
This request may thus take longer and use more CPU than a typical
request for your application.


On Tue, Apr 20, 2010 at 10:26 AM, charles eubanks <charles.euba...@gmail.com
> wrote:

> My app is essentially a specialized reminder tool.  it has a cron job
> that wakes up every 15 minutes to see if anybody needs to be nagged
> (sent an email reminder).
>
> The cron job does a query against one entity looking for anything with
> a UTC time equal or before "now".  The query looks like:
>
> "select from " + ActionItem.class.getName()
>                                + " where actionTime <= " + (hourOfDay);
>
> With that result we simply queue a task to process the actual action
> (which may be to send email).  But that's all there is to it: read a
> result set and enqueue something for each item returned.
>
> This request about 1/3 of the time blows up with the dreaded "Request
> was aborted after waiting too long to attempt to service your
> request."  Right now that is somewhat OK because the request will run
> again in 15 minutes and therefore eventually pick up the work that the
> failed requests miss.
>
> I *thought* that I was hitting a resource limit so my first attempt to
> work around this was to wrap my read loop in a try/catch looking for
> the exceptions:
>
> }catch(com.google.apphosting.api.ApiProxy.OverQuotaException oq){
>                        log.info("over quota! trying again");
>                        String stampStr = ""+gCal.getTimeInMillis();
>                        String urlStr ="/setup?hour="+stampStr+"L";
>                        TaskOptions url = TaskOptions.Builder.url(urlStr);
>                        queue.add(url.method(Method.GET));
>                }catch(com.google.apphosting.api.DeadlineExceededException
> de){
>                        log.info("out of time! trying again");
>                        String stampStr = ""+gCal.getTimeInMillis();
>                        String urlStr ="/setup?hour="+stampStr+"L";
>                        TaskOptions url = TaskOptions.Builder.url(urlStr);
>                        queue.add(url.method(Method.GET));
>
> And then stopping and re-queuing the task.  However empirically I
> don't seem to ever catch these exceptions.  My request just gets
> aborted with no warning (and apparently no log output)
>
> I am afraid that this problem will grow as the app grows so I am
> looking for ideas to fix it.  Two approaches seem to be worth trying:
>
> 1) Cache the query results somehow to avoid need to run it if
> possible.
>
> 2) Use low level data store API to run the query so that I can
> (possibly) complete a partial read of the reminder data.
>
> (question, also I am doing something wrong here? -- It seems like a
> simple query should be able to at least partially complete in the time
> it takes to do one request - given that I am the only one using my dev
> version of the app.)
>
> I am hoping someone can tell me which of these ideas is more likely to
> help (or give me an alternate idea)
>
> Thanks.
>
>
>


-- 
"Outside of a dog, a book is a man's best friend. Inside of a dog it's too
dark to read. "
-- Groucho Marx

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

Reply via email to