2

We're getting a consistent error on one of our GAE applications ( the stack trace is below ). Does anyone know what could be causing this? It throws a transient error ( which should be a short lived error ), but we get this error consistently.

StackTrace

com.google.appengine.api.search.DeleteException: Transient Error. RPC deadline exceeded. at com.google.appengine.api.search.IndexImpl$2.convertException(IndexImpl.java:217) at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:94) at com.google.appengine.api.search.FutureHelper.getInternal(FutureHelper.java:73) at com.google.appengine.api.search.FutureHelper.quietGet(FutureHelper.java:32) at com.google.appengine.api.search.IndexImpl.delete(IndexImpl.java:480)

Code

        Index index = getIndex(nameSpace, indexKind);
    while (true) {
        List<String> docIds = new ArrayList<String>();
        // Return a set of doc_ids.
        GetRequest request = GetRequest.newBuilder().setReturningIdsOnly(true).build();
        GetResponse<Document> response = index.getRange(request);
        if (response.getResults().isEmpty()) {
            break;
        }
        for (Document doc : response) {
            docIds.add(doc.getId());
        }
        index.delete(docIds);
    }

Thanks, Mike

mike.schlanser
  • 121
  • 1
  • 6
  • FWIW I'm seeing a similar issue. I made a [posting](https://code.google.com/p/googleappengine/issues/detail?id=11135) on the App Engine Issues forum about it -- maybe star it and add a comment to this post if you can so it can get some extra attention because it seems to be affecting multiple people. – user3058197 Jul 23 '14 at 15:08

2 Answers2

2

We support up to 200 deletes per request. It turns out that we had a bug in our backend release related to how we index (and delete) documents in parallel across multiple threads. It caused some requests to time out when indexing or deleting more than 76 documents at once. Batch sizes of 76 or less were not affected. We got the fix out everywhere by late afternoon Wednesday (Pacific Time), so you should be able to again send batches of up to 200 documents without issue.

Chris Bond
  • 51
  • 1
0

delete query is exceeding the RPC deadline. How many documents are being passed to delete? Try to do it in batches of 50. That should solve the issue.

  • If this is the solution, then the documentation needs to be updated. [Documentation](https://developers.google.com/appengine/docs/python/search/#Python_Deleting_documents_from_an_index) suggests up to 200 documents per delete is okay. – user3058197 Jul 23 '14 at 15:06