The AlgoliaRuntimeException is thrown when an error occurred during serialization/deserialization or data processing. More on this in our Handling Exceptions documentation.
If you're getting this error message:
com.algolia.search.exceptions.AlgoliaRuntimeException:
java.util.concurrent.CompletionException:
java.util.concurrent.CancellationException: Request execution cancelled
when using Java API Client, this could happen if the underlying apache http client has been closed.
There are two workarounds you can try:
- Reinstantiate the client when an exception like
java.util.concurrent.CancellationException: Request execution cancelled
is thrown. - If you use Java 11, use
algoliasearch-java-net
instead.
If you didn’t close the client manually somewhere by mistake, most likely, an exception has occurred and caused the apache client to shut down (before you start getting CancellationException
).