title: Tomcat 8 speed gets degraded over time
body: <p>I am using <strong>Tomcat 8.5</strong> to host a WAR which is used for java REST services.</p>
  
  <p>In my rest service, I create a connection and take a multi-part form data file from user, scan it using a scan engine and return the result. At the start, tomcat is running fine and giving a speed of almost 57-58 Mbps but degrades over time (degrades to nearly half in 5-8 min)</p>
  
  <p>My <code>setenv.bat</code> file looks like this.</p>
  
  <pre><code>"set "JAVA_OPTS=%JAVA_OPTS% -Xms1024m -Xmx5120m -XX:MaxMetaspaceSize=512m -Xincgc -server""
  </code></pre>
  
  <p><code>JVM</code> is using <code>ParNewGC</code> for garbage collection.</p>
  
  <p>my <code>server.xml</code> file looks like this</p>
  
  <pre><code>&lt;Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
          maxThreads="100" minSpareThreads="8" maxSpareThreads="10" acceptorThreadCount="16" acceptCount="500"/&gt;
  
  
  
      &lt;!--acceptCount :The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 100. 
  
  
  
      A "Connector" represents an endpoint by which requests are received
           and responses are returned. Documentation at :
           Java HTTP Connector: /docs/config/http.html
           Java AJP  Connector: /docs/config/ajp.html
           APR (HTTP/AJP) Connector: /docs/apr.html
           Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
      --&gt;
      &lt;Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 redirectPort="8443" socket.rxBufSize="10000000" socket.txBufSize="3000000" socket.directBuffer="true" /&gt;
      &lt;!-- A "Connector" using the shared thread pool--&gt; 
  </code></pre>
  
  <p>As my response is completely dynamic. I am <strong>not using any type of caching</strong>. please help me with this issue.</p>