gpt4 book ai didi

java - 为什么我的服务器停止响应并且有办法监控它吗?

转载 作者:行者123 更新时间:2023-12-02 05:19:11 24 4
gpt4 key购买 nike

我有一个在 Tomcat 8.0 中运行的 Java Web 应用程序。到目前为止,我对应用程序没有任何问题,但主要用户要求在应用程序的主页上添加几项内容,我一次添加这些内容的主要目的是测试功能。

最近,我认真进行了测试,以确保网站在准备部署时能够正常工作。在连续进行了几次测试之后,我注意到服务器似乎锁定了。起初我以为这是内存空间,但我检查了所有日志,除了

之外似乎没有收到任何错误
29-Oct-2014 16:28:16.520 INFO [main] org.apache.catalina.core.AprLifecycleListener.init The APR 
based Apache Tomcat Native library which allows optimal performance in production environments
was not found on the java.library.path:

其余的对我来说似乎很正常:

29-Oct-2014 16:28:16.658 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:28:16.682 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Oct-2014 16:28:16.684 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:28:16.686 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Oct-2014 16:28:16.686 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 344 ms
29-Oct-2014 16:28:16.703 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
29-Oct-2014 16:28:16.703 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.9
29-Oct-2014 16:28:16.718 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Tomcat 8.0\webapps\SecureAutoData1.war
29-Oct-2014 16:28:17.281 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\Tomcat 8.0\webapps\SecureAutoData1.war has finished in 562 ms
29-Oct-2014 16:28:17.281 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\docs
29-Oct-2014 16:28:17.459 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\docs has finished in 178 ms
29-Oct-2014 16:28:17.459 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\examples
29-Oct-2014 16:28:17.786 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\examples has finished in 327 ms
29-Oct-2014 16:28:17.786 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\host-manager
29-Oct-2014 16:28:17.965 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\host-manager has finished in 179 ms
29-Oct-2014 16:28:17.965 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\manager
29-Oct-2014 16:28:18.119 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\manager has finished in 154 ms
29-Oct-2014 16:28:18.119 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\ROOT
29-Oct-2014 16:28:18.261 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\ROOT has finished in 142 ms
29-Oct-2014 16:28:18.262 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:28:18.267 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:28:18.268 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1581 ms

commons-dqemon.2014-10-29:

[2014-10-29 16:11:18] [info]  [ 5144] Commons Daemon procrun (1.0.15.0 64-bit) started
[2014-10-29 16:11:18] [info] [ 5144] Running 'Tomcat8' Service...
[2014-10-29 16:11:18] [info] [ 3344] Starting service...
[2014-10-29 16:11:19] [info] [ 3344] Service started in 1106 ms.
[2014-10-29 16:27:57] [info] [ 6536] Stopping service...
[2014-10-29 16:28:02] [info] [ 6536] Service stop thread completed.
[2014-10-29 16:28:02] [info] [ 5144] Run service finished.
[2014-10-29 16:28:02] [info] [ 5144] Commons Daemon procrun finished
[2014-10-29 16:28:16] [info] [ 6532] Commons Daemon procrun (1.0.15.0 64-bit) started
[2014-10-29 16:28:16] [info] [ 6532] Running 'Tomcat8' Service...
[2014-10-29 16:28:16] [info] [ 7900] Starting service...
[2014-10-29 16:28:17] [info] [ 7900] Service started in 1111 ms.

tomcat8-stdout.2014-10-29:

2014-10-29 16:11:18 Commons Daemon procrun stdout initialized
Session ID 7D825AD72EAFB71E3E22DC3FBE59D196 destroyed at Wed Oct 29 16:12:20 EDT 2014
Session ID 8F72C027CFB28678FFE8A614353BBED7 created at Wed Oct 29 16:16:47 EDT 2014
Session ID 8F70D0F8CE0EBC149412E6DC9525AC55 created at Wed Oct 29 16:27:40 EDT 2014

2014-10-29 16:28:16 Commons Daemon procrun stdout initialized
Session ID 8F72C027CFB28678FFE8A614353BBED7 destroyed at Wed Oct 29 16:34:18 EDT 2014

直到我达到服务器锁定并终止应用程序的程度,然后我收到一个错误,说明应用程序在终止时仍在处理请求,并且存在内存泄漏的潜在威胁。下面的 catalina 日志文件中提供了这一信息:

29-Oct-2014 16:11:19.169 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:11:19.190 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Oct-2014 16:11:19.192 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:11:19.194 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Oct-2014 16:11:19.194 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 337 ms
29-Oct-2014 16:11:19.209 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
29-Oct-2014 16:11:19.209 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.9
29-Oct-2014 16:11:19.224 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Tomcat 8.0\webapps\SecureAutoData1.war
29-Oct-2014 16:11:19.788 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\Tomcat 8.0\webapps\SecureAutoData1.war has finished in 563 ms
29-Oct-2014 16:11:19.788 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\docs
29-Oct-2014 16:11:19.960 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\docs has finished in 172 ms
29-Oct-2014 16:11:19.960 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\examples
29-Oct-2014 16:11:20.303 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\examples has finished in 343 ms
29-Oct-2014 16:11:20.303 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\host-manager
29-Oct-2014 16:11:20.472 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\host-manager has finished in 169 ms
29-Oct-2014 16:11:20.472 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\manager
29-Oct-2014 16:11:20.633 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\manager has finished in 161 ms
29-Oct-2014 16:11:20.634 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\ROOT
29-Oct-2014 16:11:20.790 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\ROOT has finished in 156 ms
29-Oct-2014 16:11:20.792 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:11:20.797 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:11:20.798 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1603 ms
29-Oct-2014 16:27:57.767 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:27:57.820 INFO [Thread-6] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:27:57.870 INFO [Thread-6] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
29-Oct-2014 16:27:57.885 INFO [localhost-startStop-2] org.apache.catalina.core.StandardWrapper.unload Waiting for 1 instance(s) to be deallocated for Servlet [LoginControl]
29-Oct-2014 16:27:58.885 INFO [localhost-startStop-2] org.apache.catalina.core.StandardWrapper.unload Waiting for 1 instance(s) to be deallocated for Servlet [LoginControl]
29-Oct-2014 16:27:59.885 INFO [localhost-startStop-2] org.apache.catalina.core.StandardWrapper.unload Waiting for 1 instance(s) to be deallocated for Servlet [LoginControl]
29-Oct-2014 16:27:59.986 INFO [localhost-startStop-2] org.apache.catalina.core.StandardWrapper.unload Waiting for 1 instance(s) to be deallocated for Servlet [DirectoryAssistance]
29-Oct-2014 16:28:00.986 INFO [localhost-startStop-2] org.apache.catalina.core.StandardWrapper.unload Waiting for 1 instance(s) to be deallocated for Servlet [DirectoryAssistance]
29-Oct-2014 16:28:01.986 INFO [localhost-startStop-2] org.apache.catalina.core.StandardWrapper.unload Waiting for 1 instance(s) to be deallocated for Servlet [DirectoryAssistance]
29-Oct-2014 16:28:02.102 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads The web application [/SecureAutoData1] appears to have started a thread named [Abandoned connection cleanup thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
java.lang.Object.wait(Native Method)
java.lang.ref.ReferenceQueue.remove(Unknown Source)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:41)
29-Oct-2014 16:28:02.103 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads The web application [/SecureAutoData1] is still processing a request that has yet to finish. This is very likely 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(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
org.apache.tomcat.dbcp.pool2.impl.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:523)
org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:358)
org.apache.tomcat.dbcp.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:118)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
com.secureautodata.business.data.DBConnector.getConnection(DBConnector.java:47)
com.secureautodata.business.data.LeadFactory.fetchAdminLeads(LeadFactory.java:49)
com.secureautodata.control.DirectoryAssistance.doPost(DirectoryAssistance.java:668)
javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:22 2)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)
29-Oct-2014 16:28:02.105 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads The web application [/SecureAutoData1] is still processing a request that has yet to finish. This is very likely 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(Unknown Source)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
org.apache.tomcat.dbcp.pool2.impl.LinkedBlockingDeque.takeFirst(LinkedBlockingDeque.java:523)
org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
org.apache.tomcat.dbcp.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:358)
org.apache.tomcat.dbcp.dbcp2.PoolingDataSource.getConnection(PoolingDataSource.java:118)
org.apache.tomcat.dbcp.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1412)
com.secureautodata.business.data.DBConnector.getConnection(DBConnector.java:47)
com.secureautodata.business.data.DealerFactory.fetchDealer(DealerFactory.java:278)
com.secureautodata.control.LoginControl.doPost(LoginControl.java:99)
javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:22 2)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)
29-Oct-2014 16:28:02.119 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:28:02.188 INFO [Thread-6] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:28:16.520 INFO [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Tomcat 8.0\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell \v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Java\jdk1.8.0_11\bin;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.6\;C:\Program Files\MySQL\MySQL Server 5.6\bin;C:\wamp\bin\php\php5.5.12;C:\ProgramData\ComposerSetup\bin;C:\Maven\apache-maven- 3.2.2\bin;C:\apache-ant-1.9.4-bin\apache-ant-1.9.4\bin;C:\Python27;C:\Program Files (x86)\scala\bin;C:\Program Files (x86)\scala\bin;;.
29-Oct-2014 16:28:16.658 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:28:16.682 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Oct-2014 16:28:16.684 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:28:16.686 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
29-Oct-2014 16:28:16.686 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 344 ms
29-Oct-2014 16:28:16.703 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
29-Oct-2014 16:28:16.703 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.9
29-Oct-2014 16:28:16.718 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Tomcat 8.0\webapps\SecureAutoData1.war
29-Oct-2014 16:28:17.281 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\Tomcat 8.0\webapps\SecureAutoData1.war has finished in 562 ms
29-Oct-2014 16:28:17.281 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\docs
29-Oct-2014 16:28:17.459 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\docs has finished in 178 ms
29-Oct-2014 16:28:17.459 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\examples
29-Oct-2014 16:28:17.786 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\examples has finished in 327 ms
29-Oct-2014 16:28:17.786 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\host-manager
29-Oct-2014 16:28:17.965 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\host-manager has finished in 179 ms
29-Oct-2014 16:28:17.965 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\manager
29-Oct-2014 16:28:18.119 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\manager has finished in 154 ms
29-Oct-2014 16:28:18.119 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory C:\Tomcat 8.0\webapps\ROOT
29-Oct-2014 16:28:18.261 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory C:\Tomcat 8.0\webapps\ROOT has finished in 142 ms
29-Oct-2014 16:28:18.262 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-4273"]
29-Oct-2014 16:28:18.267 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
29-Oct-2014 16:28:18.268 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1581 ms

我唯一一次看到错误是当我关闭 Web 应用程序时,因为它无法加载,我已经将其放置了 15 分钟以上,然后回到计算机,看到本地主机上的等待仍然位于底部与我离开时的屏幕相同。

我很抱歉将所有文件中的所有信息都包含在我的日志中,但我想做到彻底。我注意到它正在谈论并发锁定错误,但除了我的连接池和服务器本身正在运行的任何线程之外,我不相信还有我编写的任何其他线程,或者也许这就是问题所在。我不太确定,希望大家能帮助我。提前致谢!

好吧,所以我认为答案肯定是连接池连接没有被释放,我太着急试图完成项目的下一部分,并且忘记在我的几个项目中添加我的释放和关闭语句数据类,但是,我返回并添加了发布语句,然后运行我的项目,我收到此错误:

Oct 29, 2014 9:40:10 PM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
java.util.ServiceConfigurationError: javax.xml.parsers.SAXParserFactory: Provider org.apache.xerces.jaxp.SAXParserFactoryImpl not found
at java.util.ServiceLoader.fail(Unknown Source)
at java.util.ServiceLoader.access$300(Unknown Source)
at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at javax.xml.parsers.FactoryFinder$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.xml.parsers.FactoryFinder.findServiceProvider(Unknown Source)
at javax.xml.parsers.FactoryFinder.find(Unknown Source)
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at org.apache.taglibs.standard.tlv.JstlBaseTLV.validate(JstlBaseTLV.java:161)
at org.apache.taglibs.standard.tlv.JstlCoreTLV.validate(JstlCoreTLV.java:105)
at org.apache.jasper.compiler.TagLibraryInfoImpl.validate(TagLibraryInfoImpl.java:378)
at org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:1883)
at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1852)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:335)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:721)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
at com.secureautodata.control.LoginControl.handler(LoginControl.java:199)
at com.secureautodata.control.LoginControl.doPost(LoginControl.java:111)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:534)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)

最佳答案

好吧,这个问题的答案一直在我眼皮子底下。 @vanOekel 向我提出,这可能是连接池问题,连接没有被释放。在我匆忙地试图完成我的项目的一部分时,我完全忽略了我的一个类中开放连接的关闭。

解决该问题后,我遇到了一个错误,其中我的 pom.xml 文件提供了一个依赖项,该依赖项与我添加到库中的几个 .jar 文件发生冲突。主要的一个是 mysql 连接器 jar,我在工作时在计算机上重新安装了 tomcat,作为一种快速解决方案,我没有将 jar 包含在我的 tomcat 库中,而是将其添加到我的 pom.xml 作为依赖项,导致与我的 pom.xml 发生冲突。我家用电脑上的 tomcat 和 IDE 设置。

从 pom.xml 中删除此依赖项并从 pom.xml 中删除 jSTL 依赖项后,一切都像梦一样。

我已经测试了几次,发现它不再锁定。看来连接正在按预期释放,并且该站点现在正在正常运行。

关于java - 为什么我的服务器停止响应并且有办法监控它吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26640500/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com