ApiDeadlineExceededException on JDO Query

10 views
Skip to first unread message

Corry Dringenburg

unread,
Feb 13, 2012, 9:09:29 AM2/13/12
to google-a...@googlegroups.com
Hello,

I keep getting periodic ApiDeadlineExceededException on a JDO Query on a back end. 

Here's the code chunk: 

                NamespaceManager.set(domain);
PersistenceManager pm = GServ.getPM();
Query approvedObjects = pm.newQuery(DomainObject.class);
approvedObjects.setFilter("docsEnabled == true && mode == thisMode");
approvedObjects.declareParameters("String thisMode");
List<DomainObject> attached = (List<DomainObject>) approvedObjects.execute(config.getMode());
List<DomainObject> detached = (List<DomainObject>) pm.detachCopyAll(attached);
pm.close();

As you can see, I'm querying on the class DomainObject with 2 filters. The issue is, in the Namespace its querying on, there are no DomainObjects so I'm confused as to why I'm exceeding the deadline when there is nothing to query on.

Here's the whole error I'm getting: 

        com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call datastore_v3.RunQuery() took too long to respond and was cancelled.

Thanks,
Corry
Reply all
Reply to author
Forward
0 new messages