Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ void setUp() throws Exception {
opensearch =
new OpensearchContainer(DockerImageName.parse("opensearchproject/opensearch:1.3.6"))
.withSecurityEnabled();
opensearch.withEnv("OPENSEARCH_JAVA_OPTS", "-Xmx256m -Xms256m");
// limit memory usage and disable Log4j JMX to avoid cgroup detection issues in containers
opensearch.withEnv(
"OPENSEARCH_JAVA_OPTS",
"-Xmx256m -Xms256m -Dlog4j2.disableJmx=true -Dlog4j2.disable.jmx=true -XX:-UseContainerSupport");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opensearch.start();
httpHost = URI.create(opensearch.getHttpHostAddress());
openSearchClient = buildOpenSearchClient();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ void setUp() throws Exception {
opensearch =
new OpensearchContainer(DockerImageName.parse("opensearchproject/opensearch:1.3.6"))
.withSecurityEnabled();
// limit memory usage
opensearch.withEnv("OPENSEARCH_JAVA_OPTS", "-Xmx256m -Xms256m");
// limit memory usage and disable Log4j JMX to avoid cgroup detection issues in containers
opensearch.withEnv(
"OPENSEARCH_JAVA_OPTS",
"-Xmx256m -Xms256m -Dlog4j2.disableJmx=true -Dlog4j2.disable.jmx=true -XX:-UseContainerSupport");
opensearch.start();
httpHost = URI.create(opensearch.getHttpHostAddress());

Expand Down
Loading