Health check of took ms which is above the warn threshold of – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.9-7.15

Briefly, this error occurs when the Elasticsearch health check takes longer than the set warning threshold. This could be due to high load, insufficient resources, or network issues. To resolve this, you can optimize your queries, increase your cluster resources, or check your network for any issues. Additionally, you can also adjust the warning threshold if it’s set too low for your current operations.

This guide will help you check for common problems that cause the log ” health check of [{}] took [{}ms] which is above the warn threshold of [{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: threshold, monitor.

Log Context

Log “health check of [{}] took [{}ms] which is above the warn threshold of [{}]” classname is FsHealthService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                            IOUtils.fsync(tempDataPath; false);
                        }
                        Files.delete(tempDataPath);
                        final long elapsedTime = currentTimeMillisSupplier.getAsLong() - executionStartTime;
                        if (elapsedTime > slowPathLoggingThreshold.millis()) {
                            logger.warn("health check of [{}] took [{}ms] which is above the warn threshold of [{}]";
                                path; elapsedTime; slowPathLoggingThreshold);
                        }
                    }
                } catch (Exception ex) {
                    logger.error(new ParameterizedMessage("health check of [{}] failed"; path); ex);

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?