Seldaek/monolog · error · RuntimeException

Error sending messages to Elasticsearch

Error message

Error sending messages to Elasticsearch

What it means

Error "Error sending messages to Elasticsearch" thrown in Seldaek/monolog.

Source

Thrown at src/Monolog/Handler/ElasticaHandler.php:139

    {
        $documents = $this->getFormatter()->formatBatch($records);
        $this->bulkSend($documents);
    }

    /**
     * Use Elasticsearch bulk API to send list of documents
     *
     * @param Document[] $documents
     *
     * @throws \RuntimeException
     */
    protected function bulkSend(array $documents): void
    {
        try {
            $this->client->addDocuments($documents);
        } catch (ExceptionInterface | TransportException $e) {
            if (!$this->options['ignore_error']) {
                throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e);
            }
        }
    }
}

View on GitHub (pinned to 57eb102834)

When it happens

Trigger: Thrown at src/Monolog/Handler/ElasticaHandler.php:139 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Seldaek/monolog@57eb102834 (2026-08-17). Data as JSON: /api/errors/b4ac599507246dfa. Report an issue: GitHub.