graylog2-server
graylog2-server copied to clipboard
throw custom exception with help text on parent circuit breaking exception
Description
closes Graylog2/graylog-plugin-enterprise#7917
When the exception of type circuit_breaking_exception occurs and the reason is the parent circuit breaker we throw a custom exception with an addition help text. This is an example log:
2025-12-10 13:52:06,046 ERROR: org.graylog.plugins.archive.backends.AbstractCloudArchiveBackend - Error while spooling from index <test_g1_238>
org.graylog2.indexer.ParentCircuitBreakingException: OpenSearch exception [type=circuit_breaking_exception, reason=[parent] Data too large, data for [<http_request>] would be [754627988/719.6mb], which is larger than the limit of [751619276/716.7mb], real usage: [754627688/719.6mb], new bytes reserved: [300/300b], usages [request=0/0b, fielddata=72174/70.4kb, in_flight_requests=300/300b]]
This error typically indicates that the Opensearch cluster is short on JVM Heap, decrease load or increase the JVM Heap provision to resolve.
at org.graylog.storage.opensearch2.OpenSearchClient.exceptionFrom(OpenSearchClient.java:208)
at org.graylog.storage.opensearch2.OpenSearchClient.executeWithIOException(OpenSearchClient.java:166)
at org.graylog.storage.opensearch2.ScrollResultOS2.nextSearchResult(ScrollResultOS2.java:62)
at org.graylog.storage.opensearch2.ScrollResultOS2.nextSearchResult(ScrollResultOS2.java:31)
at org.graylog2.indexer.results.ChunkedQueryResult.nextChunk(ChunkedQueryResult.java:68)
at org.graylog.plugins.archive.indexer.IndexTools.scrollIndices(IndexTools.java:98)
at org.graylog.plugins.archive.backends.AbstractArchiveBackend.archiveWithDynamicBatchSize(AbstractArchiveBackend.java:146)
at org.graylog.plugins.archive.backends.AbstractCloudArchiveBackend.archiveIntoSegments(AbstractCloudArchiveBackend.java:224)