To be defensive, you may want to try setting ~8 second timeouts for
queries (setTimeoutMillis()) and for general read/writes in, for jdo,
jdoconfig.xml (javax.jdo.option.DatastoreReadTimeoutMillis,
javax.jdo.option.DatastoreWriteTimeoutMillis). You can then retry a
couple times within the request keeping under the 30 second limit.

It often, but not always, succeeds on one of the retries and salvages
the request.

/Tom

On Jul 28, 5:11 pm, Eduardo Garcia Lopez <egar...@stream18.com> wrote:
> Hi,
>
> since last week I am experiencing a very serious problem in my application. 
> Probably since I deployed for the first time after the new SDK 1.5.2 was 
> released.
>
> The application is locking during 30 seconds (then it raises an timeout 
> Exception) just doing a single query. The query starts running normally 
> during a couple hours, then randomly starts locking, and after that almost 
> all queries like this lock. This is the query:
>
>         PersistenceManager pm = PMF.get().getPersistenceManager();
>         cmd = pm.getObjectById(Command.class, id);
>
> I have also tried changing to this query:
>                  PersistenceManager pm = PMF.get().getPersistenceManager();
>         query = pm.newQuery(Command.class, "id == idParameter");
>         query.declareParameters("Long idParameter");
>         query.setRange(0,1);
>         query.setUnique(true);
>         cmd = (Command) query.execute(id);
>
> in both cases, it hangs in last sentence.
>
> The persistence class is NOT marked as detachable.
>
> The received exception is this:
> com.google.apphosting.api.ApiProxy$ApiDeadlineExceededException: The API call 
> datastore_v3.RunQuery() took too long to respond and was cancelled
>
> Can somebody help me with this? Is somebody experiencing this error?

-- 
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-java@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