quartz集群报错but has failed to stop it. This is very likely to create a memory leak.

在一台配置1核2G内存的阿里云服务器上运行quartz;执行定时任务报如下异常,而在本地开发环境中则正常运行。


10-Sep-2016 11:43:50.415 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [faxian] appears to have started a thread named [logback-1] 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.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
10-Sep-2016 11:43:50.415 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [faxian] 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(ReferenceQueue.java:143)
com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:43)
10-Sep-2016 11:43:50.416 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [faxian] appears to have started a thread named [clusterQuartzScheduler_Worker-1] 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)
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:568)
10-Sep-2016 11:43:50.417 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [faxian] appears to have started a thread named [clusterQuartzScheduler_Worker-2] 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)

根据异常,初步判断是内存溢出导致的问题。查看服务器内存使用情况


[root@test-server logs]# free -h
total used free shared buffers cached
Mem: 1.8G 1.7G 84M 9.4M 154M 520M
-/+ buffers/cache: 1.1G 759M
Swap: 0B 0B 0B

于是查看quartz的配置


<task:executor id="quartzTaskExecutor" keep-alive="900" pool-size="10" queue-capacity="20" />

pool-size="10",queue-capacity="20"。

然而根据实际情况并,连接池数量和容量并不需要这么大。改成pool-size="1"queue-capacity="1",再次启动不再报错。

查看服务器内存使用情况


[root@test-server logs]# free -h
total used free shared buffers cached
Mem: 1.8G 1.7G 141M 9.3M 154M 422M
-/+ buffers/cache: 1.1G 718M
Swap: 0B 0B 0B

quartz集群报错but has failed to stop it. This is very likely to create a memory leak.的更多相关文章

  1. dfs.datanode.max.xcievers参数导致hbase集群报错

    2013/08/09 转发自http://bkeep.blog.163.com/blog/static/123414290201272644422987/ [案例]dfs.datanode.max.x ...

  2. redis集群报错

    写入redis集群报错:(error) MOVED 6918 解决方法:redis-cli -c -p 7001 -h 10.0.0.104

  3. nginx集群报错“upstream”directive is not allow here 错误

    nginx集群报错“upstream”directive is not allow here 错误 搭建了一个服务器, 采用的是nginx + apache(多个) + php + mysql(两个) ...

  4. Redis创建集群报错

    Redis创建集群报错: 1:任何一个集群节点中都不能存在数据,如果有备份一下删除掉aof文件或rdb文件 2: nodes-集群端口.conf 文件存的会有报错记录,所以该文件也要删除

  5. 搭建elsticsearch集群 报错with the same id but is a different node instance解决办法

    搭建elsticsearch集群 报错with the same id but is a different node instance解决办法 学习了:https://blog.csdn.net/q ...

  6. tomcat 6.0.44 “has failed to stop it. This is very likely to create a memory leak” 问题调查

    1. 问题起因 我们项目中缓存模块某个实现采用了ehcache(2.4.3),当项目部署到tomcat中后,对tomcat做停止服务操作(点击eclipse的console红色的停止按钮,奇怪的是有小 ...

  7. quartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak解决

    01-Jul-2016 07:24:20.218 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 80 ...

  8. but has failed to stop it. This is very likely to create a memory leak(c3p0在Spring管理中,连接未关闭导致的内存溢出)

    以下是错误日志信息: 严重: The web application [/news] registered the JDBC driver [com.mysql.jdbc.Driver] but fa ...

  9. ceph -s集群报错too many PGs per OSD

    背景 集群状态报错,如下: # ceph -s cluster 1d64ac80-21be-430e-98a8-b4d8aeb18560 health HEALTH_WARN <-- 报错的地方 ...

随机推荐

  1. [CareerCup] 6.6 Toggle Lockers 切换锁的状态

    6.6 There are 100 closed lockers in a hallway. A man begins by opening all 100 lockers. Next, he clo ...

  2. LeetCode 笔记系列13 Jump Game II [去掉不必要的计算]

    题目: Given an array of non-negative integers, you are initially positioned at the first index of the ...

  3. Javascript execCommon

    http://blog.csdn.net/woshinia/article/details/18664903 https://developer.mozilla.org/zh-CN/docs/Web/ ...

  4. 备忘:用fiddler搭一个请求响应器

    最近工作中发现美国的服务器响应慢,影响工作效率.就在想办法.突然发现fiddler可以帮我解决这个问题.AutoResponder功能可以帮我们做到.在其中设置一些请求,比如:http://xxxx. ...

  5. 【C#】C#容易忽视的错误

    1.string 拼接站内存,前提是字符串比较多的时候string 字符串类型拼接占内存,解决方法就是用 StringBuilder和String.Format2.不知道内置的验证数据类型的方法. ; ...

  6. 简单所以不要忽视,关于\r\n和\n程序员应了解的实际应用

    众所周知,\r叫回车符,\n叫换行符. 由于历史原因,windows环境下的换行符是\r\n;(文章最后会稍微解释这个历史原因) linux和html等开源或公开标准中的换行符是\n. 记录这篇笔记的 ...

  7. tomcat处理中文文件名的访问(乱码)

    解决问题的核心在于修改Tomcat的配置,在Server.xml文件中添加一个名为URIEncoding的属性,它用于对HTTP请求中的get方法传过来的URL进行编码.Tomcat内置的对于get协 ...

  8. struts2+spring+hibernate(SSH)框架的搭建和总结

    SSH框架:struts2+spring+hibernate,是目前较流行的一种Web应用程序开源集成框架,用于构建灵活.易于扩展的多层Web应用程序. struts2+spring+hibernat ...

  9. Thinking in java学习笔记之持有对象总结

  10. Android 适配知识点

    转载:https://gold.xitu.io/post/58451c1d8e450a006c0f1c74 支持多种屏幕 Android 可在各种具有不同屏幕尺寸和密度的设备上运行.对于 应用,And ...