My CouchDB (production) server is sometimes shut down, without my wanting it to. While inspecting logs I noticed Erlang/CouchDB (one or the other) sends a heart beat, and that heart beat is monitored. When a time-out occurs, the server is brutally killed (couchdb -k
). This is almost always unwanted behaviour, definitely on a production server.
I've come across this issue, which states the same and indicates this mostly occurs during heavy server loads, something I noticed also.
I'm looking for a solution to keep my server running, but to do that I need to know more about this behaviour. Unfortunately both the CouchDB wiki and the guide don't give much information about this (only the parameter in the changes API).
Can someone provide more info about this?
The couchdb -k should kill the background process and then couch should be restarted. However by default the restart feature is disabled. To enable it you should use -r parameter with value greater than 0. You can do it in bin/couchdb script - change RESPAWN_TIMEOUT from 0 to e.g. 5.
Most likely heart is the heart launched when erlang vm starts up.
Take a look at heart switch here http://erlang.org/doc/man/erl.html and its documentation here http://erlang.org/doc/man/heart.html.
Now, you can either give a link to couch repo you use, so we can find a script with 'erl something -heart' or grep it out yourself.
I am not sure what is the status of couch build system.. do you use cloudant version or pure apache?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With