title: Tomcat Server Crashes Every Three Days
body: <p>I've been asked to find out why my job's Tomcat server crashes about every three days. I was told to look through the Tomcat logs, but there are so many errors that I don't even know where to begin. The main thing causing the crashes is a memory error, but we don't know what is causing it. Any help would be greatly appreciated.</p>
  
  <pre><code>03-Aug-2018 08:10:51.133 WARNING [superiorhydraulics.com-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] is still processing a request that has yet to finish. This is very l
  ikely to create a memory leak. You can control the time allowed for requests to finish by using the unloadDelay attribute of the standard Context implementation. Stack trace of request processing thread:
   sun.misc.Unsafe.park(Native Method)
   java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
   java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
   org.apache.tomcat.dbcp.pool2.impl.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:586)
   org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:438)
   org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:359)
   org.apache.tomcat.dbcp.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:134)
   org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1543)
   com.pbs.tools.DBHandler.&lt;init&gt;(DBHandler.java:25)
   com.pbs.tools.ApplicationBean.Initialize(ApplicationBean.java:32)
   org.apache.jsp.listitem_jsp._jspService(listitem_jsp.java:174)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:108)
   org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   org.apache.catalina.valves.CrawlerSessionManagerValve.invoke(CrawlerSessionManagerValve.java:180)
   org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
   org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
   org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:478)
   org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
   org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:802)
   org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
   org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
   java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   java.lang.Thread.run(Thread.java:745)
  </code></pre>