I want to configure my Apache Tomcat/8.5.37 by setting configuration attributes like maxThreads, maxConnections, acceptCount etc. in such a way, I can get 503 error in reply to a REST call by sending some concurrent requests (like 100 requests at a time). How can to do that?
Edit: I am getting 'connection refused' response in some cases. How can I get status 503 instead of 'connection refused'?