8000 Tomcat 不能 graceful shutdown · Issue #535 · binarywang/WxJava · GitHub
[go: up one dir, main page]

Skip to content
Tomcat 不能 graceful shutdown #535
@gtyang

Description

@gtyang

我的配置是 tomcat + spring boot mvc,从spring boot 的例子工程中修改出来的,sdk 的版本 2.9.6。部署到tomcat下运行,不能正常的shutdown,有很多线程不能shutdown,例如:

12-Apr-2018 20:24:51.951 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [ROOT] appears to have started a thread named [pool-2-thread-9] but has failed to stop it. This is very likely to create a memory leak. Stack trace of 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)
 java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)

还有这类的:

12-Apr-2018 20:24:52.004 SEVERE [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@2926f399]) and a value of type [com.github.binarywang.wxpay.bean.WxPayApiData] (value [
【请求地址】:https://api.mch.weixin.qq.com/pay/unifiedorder
【请求数据】:<xml>
  <appid>wxxxxxxx</appid>
  <mch_id>1xxx</mch_id>
  <nonce_str>1523530799119</nonce_str>
  <sign>3D1?????????????</sign>
  <body>abcddd</body>
  <out_trade_no>tx-341</out_trade_no>
  <total_fee>1</total_fee>
  <spbill_create_ip>172.31.233.29</spbill_create_ip>
  <time_start>20180412185959</time_start>
  <time_expire>20180412205959</time_expire>
  <notify_url>http://mp.x.moxxbi.com/pay/notify</notify_url>
  <trade_type>JSAPI</trade_type>
  <openid>oEKyxCRT93OmoI</openid>
</xml>
【响应数据】:<xml><return_code><![CDATA[SUCCESS]]></return_code>
<return_msg><![CDATA[OK]]></return_msg>
<appid><![CDATA[wx????da0???]]></appid>
<mch_id><![CDATA[14966786487324-002]]></mch_id>
<nonce_str><![CDATA[EyuXgXeSJyDAeM4W]]></nonce_str>
<sign><![CDATA[F1C2CF6??????618B4D56EE74495A4686]]></sign>
<result_code><![CDATA[SUCCESS]]></result_code>
<prepay_id><![CDATA[wx12x883721bd45d2797498456]]></prepay_id>
<trade_type><![CDATA[JSAPI]]></trade_type>
</xml>]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

我没看到在哪里设置graceful shutdown相关的配置,

请求帮助

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0