Hi.

I have a cron job that runs once a day. In about 10% of the runs, the
app engine log says "Request was aborted after waiting too long to
attempt to service your request..." In the other runs, I can see that
the part of the (fairly simple and short) code [1] fetching data from
the database takes most (i.e. 99,99...%) of the time. The query in [1]
always returns 0 Subscribers, which is correct.

Questions:
1. Is there anything I can do to cut down the database access time?
2. Why is database access taking so much time even though no
Subscribers are returned?
3. Is the local db store similar enough to the live datastore so that
profiling the app locally will yield an realistic indication on live
performance?

Thanks for any help!

-Fredrik

[1]:
...
PersistenceManager pm = PMF.getPM();
Query q = pm.newQuery("select from "+Subscriber.class.getName()+"
where active == true");
List<Subscriber> l = (List<Subscriber>)q.execute();
...

The PMF class:

public class PMF {
        static PersistenceManagerFactory pmf =
JDOHelper.getPersistenceManagerFactory("transactions-optional");
        public static PersistenceManager getPM(){
                return pmf.getPersistenceManager();
        }
}

--

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