Skip to content

Instantly share code, notes, and snippets.

@kostia
Created June 27, 2013 08:07
Show Gist options
  • Save kostia/5874772 to your computer and use it in GitHub Desktop.
Save kostia/5874772 to your computer and use it in GitHub Desktop.
Diff for Elasticsearch Homebrew formula, increasing available memory for Elasticsearch and default pool size for JVM's permanent generation. Basically it solves the problem with `java.lang.OutOfMemoryError: PermGen space` when running Elasticsearch.
diff --git a/Library/Formula/elasticsearch.rb b/Library/Formula/elasticsearch.rb
index bed30bf..054c9ce 100644
--- a/Library/Formula/elasticsearch.rb
+++ b/Library/Formula/elasticsearch.rb
@@ -105,7 +105,11 @@ class Elasticsearch < Formula
<key>EnvironmentVariables</key>
<dict>
<key>ES_JAVA_OPTS</key>
- <string>-Xss200000</string>
+ <string>-Xss200000 -XX:PermSize=500m -XX:MaxPermSize=500m</string>
+ <key>ES_HEAP_SIZE</key>
+ <string>1g</string>
+ <key>ES_MAX_MEM</key>
+ <string>1g</string>
</dict>
<key>RunAtLoad</key>
<true/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment