title: Tomcat requests load issue "Connection refused"
body: <p>I have an app on tomcat 7.50, works fine on single request but on many simultanious requests (~1200) I'm getting:</p>
  
  <pre><code>2014-11-02 11:22:48,485 ERROR  [MONITOR-AGENT ] Connection to http://localhost:9080 refused from url http://localhost:9080/monitorLog/monitor?id=21812&amp;name=sv17222_DB82C_201410282357.log...
  2014-11-02 11:22:48,485 ERROR  [MONITOR-AGENT ] Connection to http://localhost:9080 refused 
  
  org.apache.http.conn.HttpHostConnectException: Connection to http://localhost:9080 refused
  
          at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
  
          at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
  
          at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
  
          at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
  
          at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
  
          at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
  
          at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:941)
  
          at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:919)
  
          at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:910)
  
          at com.securegion.monitoragent.monitor.MonitorAgent.httpGet(MonitorAgent.java:291)
  
          at com.securegion.monitoragent.monitor.MonitorAgent.monitor(MonitorAgent.java:239)
  
          at com.securegion.monitoragent.monitor.MonitorAgent.check(MonitorAgent.java:203)
  
          at com.securegion.monitoragent.engine.Agent.run(Agent.java:35)
  
          at java.util.TimerThread.mainLoop(Unknown Source)
  
          at java.util.TimerThread.run(Unknown Source)
  
  Caused by: java.net.ConnectException: Connection refused: connect
  
          at java.net.DualStackPlainSocketImpl.connect0(Native Method)
  
          at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
  
          at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
  
          at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
  
          at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
  
          at java.net.PlainSocketImpl.connect(Unknown Source)
  
          at java.net.SocksSocketImpl.connect(Unknown Source)
  
          at java.net.Socket.connect(Unknown Source)
  
          at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123)
  
          at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
  
          ... 14 more
  </code></pre>
  
  <p>My server.xml connector:</p>
  
  <pre><code>&lt;Connector port="9080" protocol="HTTP/1.1"
  connectionTimeout="60000"
  redirectPort="8443" keepAliveTimeout = "-1"
  maxThreads="150" acceptCount="1500"/&gt;
  </code></pre>
  
  <p>It's fine if some requests will be rejected and will be resolved in next iteration, but just few (~5) are getting a success before server giving me those messaggs</p>