From 3fd00b70c100d21865a30773149dd7b77de40a0a Mon Sep 17 00:00:00 2001 From: hatsch Date: Mon, 19 Jan 2015 15:56:15 +0100 Subject: [PATCH 1/4] Change timeout after stopping solr. --- templates/initscript.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/initscript.j2 b/templates/initscript.j2 index 30c74d7..b8ea8b3 100644 --- a/templates/initscript.j2 +++ b/templates/initscript.j2 @@ -81,7 +81,7 @@ case "$1" in start-stop-daemon --stop --quiet --pidfile $SOLRPID log_progress_msg "solr" # Wait a little and remove stale PID file - sleep 1 + sleep 4 if [ -f $SOLRPID ] && ! ps h `cat $SOLRPID` > /dev/null then # Stale PID file (solr was succesfully stopped), @@ -92,7 +92,7 @@ case "$1" in ;; restart|force-reload) $0 stop - sleep 4 + sleep 1 $0 start ;; status) From 51e146e0f805947c898b86bf3b64e8005e8c3ec2 Mon Sep 17 00:00:00 2001 From: hatsch Date: Sun, 8 Mar 2015 14:39:00 +0100 Subject: [PATCH 2/4] Add dependency to meta yml. --- meta/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/main.yml b/meta/main.yml index ec797d0..72408e4 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -14,3 +14,4 @@ galaxy_info: categories: - web - database +dependencies: [] From 2cc8711e83d5ebcd2313b57438d68b8b6fe26695 Mon Sep 17 00:00:00 2001 From: hatsch Date: Mon, 15 Feb 2016 13:00:13 +0100 Subject: [PATCH 3/4] Make memory option configurable. --- defaults/main.yml | 1 + templates/initscript.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index eabe24b..55ec10b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,3 +7,4 @@ solr_home_path: /var/data/solr solr_home_owner: root solr_home_group: root solr_home_mode: 755 +solr_java_memory_options: "-Xmx128M -Xms64M -XX:MaxPermSize=64M -Xmn32M" diff --git a/templates/initscript.j2 b/templates/initscript.j2 index b8ea8b3..45a2cc6 100644 --- a/templates/initscript.j2 +++ b/templates/initscript.j2 @@ -35,7 +35,7 @@ export PATH=/sbin:/usr/sbin:/bin:/usr/bin # The following variables can be overwritten in $DEFAULT if [ -z "$JAVA_OPTS" ]; then - JAVA_OPTS="-Djava.awt.headless=true -Dsolr.solr.home={{ solr_home_path }}" + JAVA_OPTS="-Djava.awt.headless=true -Dsolr.solr.home={{ solr_home_path }} {{ solr_java_memory_options }}" fi # End of variables that can be overwritten in $DEFAULT From 82e7b22bc16fe587a5ece9addf5ab6932c0b352a Mon Sep 17 00:00:00 2001 From: hatsch Date: Fri, 4 Mar 2016 12:39:56 +0100 Subject: [PATCH 4/4] Increase timeout between stopping and starting. --- templates/initscript.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/initscript.j2 b/templates/initscript.j2 index 45a2cc6..026abec 100644 --- a/templates/initscript.j2 +++ b/templates/initscript.j2 @@ -92,7 +92,7 @@ case "$1" in ;; restart|force-reload) $0 stop - sleep 1 + sleep 3 $0 start ;; status)