Bulk request executionId has been cancelled – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.3-8.9

Briefly, this error occurs when a bulk request in Elasticsearch is cancelled before it completes execution. This could be due to a timeout, a system shutdown, or a manual cancellation. To resolve this issue, you can increase the timeout limit, ensure the system is stable and not prone to unexpected shutdowns, or check for any scripts or processes that might be cancelling the request prematurely. Additionally, breaking down large bulk requests into smaller ones can help prevent timeouts or system overloads.

This guide will help you check for common problems that cause the log ” Bulk request ” + executionId + ” has been cancelled. ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: bulk, request.

Log Context

Log “Bulk request ” + executionId + ” has been cancelled.” classname is BulkRequestHandler.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            if (concurrentRequests == 0) {
                latch.await();
            }
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            logger.info(() -> "Bulk request " + executionId + " has been cancelled."; e);
            listener.afterBulk(executionId; bulkRequest; e);
        } catch (Exception e) {
            logger.warn(() -> "Failed to execute bulk request " + executionId + "."; e);
            listener.afterBulk(executionId; bulkRequest; e);
        } finally {

 

 [ratemypost]