A new user interface for you! Read more...

File couchdb-1.6.1-fix-restart.patch of Package couchdb

https://bugzilla.suse.com/show_bug.cgi?id=919927

when erlang hangs for some seconds,
the heartbeat will try to print some messages
before restarting couchdb
but that failed from closed file descriptors
and left all of couchdb stopped

Index: apache-couchdb-1.6.1/bin/couchdb.tpl.in
===================================================================
--- apache-couchdb-1.6.1.orig/bin/couchdb.tpl.in
+++ apache-couchdb-1.6.1/bin/couchdb.tpl.in
@@ -270,9 +270,9 @@ start_couchdb () {
         echo "Apache CouchDB has started, time to relax."
     else
         if test "$RECURSED" = "true"; then
-            # close stdout / stderr
-            exec 1>&-
-            exec 2>&-
+            # redirect stdout / stderr
+            exec 1>/var/log/couchdb/daemon-stdout.log
+            exec 2>/var/log/couchdb/daemon-stderr.log
             while true; do
                 export HEART_COMMAND
                 export HEART_BEAT_TIMEOUT
@@ -292,6 +292,7 @@ start_couchdb () {
                 if test "$RESPAWN_TIMEOUT" != "1"; then
                     plural_ending="s"
                 fi
+                date "+%F %T"
                 cat << EOF
 Apache CouchDB crashed, restarting in $RESPAWN_TIMEOUT second$plural_ending.
 EOF