You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2021/06/03 07:16:10 UTC
[james-project] 02/02: [REFACTORING] Add a memory hepa size limit
on ES docker container
This is an automated email from the ASF dual-hosted git repository.
rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 9f7425e531ac86ff07a05bec471a9b808d1c640d
Author: Rene Cordier <rc...@linagora.com>
AuthorDate: Tue Jun 1 10:57:52 2021 +0700
[REFACTORING] Add a memory hepa size limit on ES docker container
The default is 1Go. I'm betting on half here (512M).
---
.../test/java/org/apache/james/backends/es/v7/DockerElasticSearch.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/DockerElasticSearch.java b/backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/DockerElasticSearch.java
index 15f5732..5ece588 100644
--- a/backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/DockerElasticSearch.java
+++ b/backends-common/elasticsearch-v7/src/test/java/org/apache/james/backends/es/v7/DockerElasticSearch.java
@@ -20,6 +20,7 @@
package org.apache.james.backends.es.v7;
import static org.apache.james.backends.es.v7.DockerElasticSearch.Fixture.ES_HTTP_PORT;
+import static org.apache.james.backends.es.v7.DockerElasticSearch.Fixture.ES_MEMORY;
import java.net.MalformedURLException;
import java.net.URL;
@@ -124,6 +125,7 @@ public interface DockerElasticSearch {
interface Fixture {
int ES_HTTP_PORT = 9200;
+ int ES_MEMORY = 620;
}
class NoAuth implements DockerElasticSearch {
@@ -133,6 +135,7 @@ public interface DockerElasticSearch {
.withTmpFs(ImmutableMap.of("/usr/share/elasticsearch/data", "rw,size=200m"))
.withExposedPorts(ES_HTTP_PORT)
.withEnv("discovery.type", "single-node")
+ .withEnv("ES_JAVA_OPTS", "-Xms" + ES_MEMORY + "m -Xmx" + ES_MEMORY + "m")
.withAffinityToContainer()
.waitingFor(new HostPortWaitStrategy().withRateLimiter(RateLimiters.TWENTIES_PER_SECOND));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org