It usually gives a 404 error when the application is unavailable and tomcat is still running. I think there is a working directive for this, and this is fail_on_status
, and you can use this for 404 error, and it may not be necessary to include the 503 error code with this directive, which probably means tomcat is stopped, and this is mod_jk working to go to another node resource. Try below workers.properties
(the line attached to each employee) also for other error codes, separated by comma.
worker.list=myworker worker.myworker1.port=8009 worker.myworker1.host=host1 worker.myworker1.type=ajp13 worker.myworker1.lbfactor=1 #worker.myworker1.fail_on_status=-404,503 worker.myworker1.fail_on_status=-404 worker.myworker2.port=8009 worker.myworker2.host=host2 worker.myworker2.type=ajp13 worker.myworker2.lbfactor=1 #worker.myworker2.fail_on_status=-404,503 worker.myworker2.fail_on_status=-404 worker.myworker.type=lb worker.myworker.balance_workers=myworker1,myworker2 worker.myworker.sticky_session=True worker.myworker.sticky_session_force=True
source share