We are running the Apache solr on two servers. Unfortunately on heavy load of indexing (guess) servers going down. We are manually restarting the tomcat each time.
When I google I find the way two restart tomcat automatically using vm options
-XX:OnOutOfMemoryError="<cmd args>;
<cmd args>"
So I believe this below command will restart the tomcat when every we getting the out of memory
-XX:OnOutOfMemoryError="/etc/init.d/tomcat restart"
But how can I sync this process to another server. both servers are in sharding.
Can anyone help me on this?