正文
定时任务起的java进程没有释放导致oracle的问题not availavle & out of memory
小程序:扫一扫查出行
【扫一扫了解最新限行尾号】
复制小程序
【扫一扫了解最新限行尾号】
复制小程序
最近发现一个问题,我们设置了一个定时任务,用于每天的对账,每天的对账都是启动一个java程序(jar包),时间久了,出现下面的问题:
有很多CardPaymentBatch.jar进程驻留在系统当中,随之出现的问题:
数据库连接不上。当时百思不得其解,不知道什么原因,所有尝试关掉几个进程,数据库就可以连接了。
今天特地搜了一下,网上有人回答了:
在非Web应用中,手工加载Spring IoC容器,不能用ApplicationContext,要用AbstractApplicationContext。用完以后要记得调用ctx.close()关闭容器。如果不记得关闭容器,最典型的问题就是数据库连接不能释放。
所以显而易见,跑完对账应该关闭容器。
定时任务起的java进程没有释放导致oracle的问题not availavle & out of memory的更多相关文章
-
ArcSOC进程数不断增长导致oracle processes溢出原因分析
现场出现了一个问题,oracle运行一段时间之后,process个数会溢出,然后新的连接会失败.通过分析,发现Arcgis Server 的ArcSOC进程在不段增长.ArcSOC是arcgis se ...
-
避免因为Arcgis Server服务设置不当导致Oracle Process溢出的方法
我之前写过一篇文章<arcsoc进程无限增长导致oracle processes溢出>(见链接:https://www.cnblogs.com/6yuhang/p/9379086.html ...
-
性能分析(1)- Java 进程导致 CPU 使用率升高,问题怎么定位?
性能分析小案例系列,可以通过下面链接查看哦 ps:这些分析小案例不能保证百分比正确,是博主学习过程中的总结,仅做参考 前提 本机有一个很占用 CPU 的项目,放在了 Tomcat 下启动着 如何定位 ...
-
哪些原因会导致JAVA进程退出?
本文转载自哪些原因会导致JAVA进程退出? 导语 JAVA进程消失可能有哪些原因? 那我们就开一篇文章说一下这个问题,其实很easy的,无外乎三种情况. linux的OOM killer杀死 JVM自 ...
-
Jps介绍以及解决jps无法查看某个已经启动的java进程问题【盗用】
1.jps的作用 jps类似linux的ps命令,不同的是ps是用来显示进程,而jps只显示java进程,准确的说是当前用户已启动的部分java进程信息,信息包括进程号和简短的进程command. 2 ...
-
分析java进程假死状况
摘自: http://www.myexception.cn/internet/2044496.html 分析java进程假死情况 1 引言 1.1 编写目的 为了方便大家以后发现进程假死的时候能够正常 ...
-
Java进程占用内存过高,排查解决方法
最近收到邮件报警,说内存使作率达到84%.如下图: 解决方法: A:可能是代码原因导致的问题: 1.使用命令:top 查看当前进程的状态 2.从上图可以看到PID:916的java进程占用内存较大.定 ...
-
jps不显示java进程信息
本来想自己整理,发现已经有前人整理,并且完美解决了我的问题,故转载,感谢分享 转自:http://trinea.iteye.com/blog/1196400 对于jps较熟悉可以直接查看第二部分的分析 ...
-
如何优雅地停止Java进程
目录 理解停止Java进程的本质 应该如何正确地停止Java进程 如何注册关闭钩子 使用关闭钩子的注意事项 信号量机制 总结 理解停止Java进程的本质 我们知道,Java程序的运行需要一个运行时环境 ...
随机推荐
-
hdu5391-Zball in Tina Town-威尔逊定理(假证明)
Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zba ...
-
用python来分割图片
程序思路: 此次程序主要是利用PIL(Python Image Libraty)这库,来进行图片的处理.PIL是一个功能非常强大的python图像处理标准库,但由于PIL只支持python2.7.如今 ...
-
mongodb数据到MySQL数据库 的迁移步骤
废话少说,直接上干货. 1.mongoexport -d shengyang -c testData -f _id,x,name,name1,name2 --type=csv -o new.csv 用 ...
-
HDU 6351 Naive Operations(线段树)
题目: http://acm.hdu.edu.cn/showproblem.php?pid=6315 Naive Operations Time Limit: 6000/3000 MS (Java/O ...
-
@JsonInclude(JsonInclude.Include.NON_NULL) 加在对象上
@JsonInclude(JsonInclude.Include.NON_NULL) public class ViewWorkermessage implements Serializable { ...
-
手工命令行 搭建 hadoop 和 spark 环境
环境准备:3台CentOS7,64位,Hadoop2.7需要64位Linux 192.168.20.161 192.168.20.162 192.168.20.163 三台机器分别叫host01. ...
-
Centos 7 下 Mysql 5.7 Galera Cluster 集群部署
一.介绍 传统架构的使用,一直被人们所诟病,因为MySQL的主从模式,天生的不能完全保证数据一致,很多大公司会花很大人力物力去解决这个问题,而效果却一般,可以说,只能是通过牺牲性能,来获得数据一致性 ...
-
java 对一个字符串去重,即去掉字符串内重复元素
String str ="abc|efa|abc|efa|abc"; String str1 = str.replaceAll("(?s)(.)(?=.*\\1)&quo ...
-
PHP文件上传与下载
一:上传文件与报错 $_FILES 超全局数组,包含了有关上传文件的所有信息! 而且,这个数组中只包含文件相关信息,其他数据依然在$_POST里面$_FILES是一个二维数组,每上传一个文件,都是数组 ...
-
java深拷贝与浅拷贝
1.调用Object类的clone方法必须实现Cloneable接口,clone属于浅拷贝. 2.可以通过java的反序列化机制进行深拷贝. 3.可以直接用apache提供的一些包进行深拷贝和浅拷贝, ...
现场出现了一个问题,oracle运行一段时间之后,process个数会溢出,然后新的连接会失败.通过分析,发现Arcgis Server 的ArcSOC进程在不段增长.ArcSOC是arcgis se ...
我之前写过一篇文章<arcsoc进程无限增长导致oracle processes溢出>(见链接:https://www.cnblogs.com/6yuhang/p/9379086.html ...
性能分析小案例系列,可以通过下面链接查看哦 ps:这些分析小案例不能保证百分比正确,是博主学习过程中的总结,仅做参考 前提 本机有一个很占用 CPU 的项目,放在了 Tomcat 下启动着 如何定位 ...
本文转载自哪些原因会导致JAVA进程退出? 导语 JAVA进程消失可能有哪些原因? 那我们就开一篇文章说一下这个问题,其实很easy的,无外乎三种情况. linux的OOM killer杀死 JVM自 ...
1.jps的作用 jps类似linux的ps命令,不同的是ps是用来显示进程,而jps只显示java进程,准确的说是当前用户已启动的部分java进程信息,信息包括进程号和简短的进程command. 2 ...
摘自: http://www.myexception.cn/internet/2044496.html 分析java进程假死情况 1 引言 1.1 编写目的 为了方便大家以后发现进程假死的时候能够正常 ...
最近收到邮件报警,说内存使作率达到84%.如下图: 解决方法: A:可能是代码原因导致的问题: 1.使用命令:top 查看当前进程的状态 2.从上图可以看到PID:916的java进程占用内存较大.定 ...
本来想自己整理,发现已经有前人整理,并且完美解决了我的问题,故转载,感谢分享 转自:http://trinea.iteye.com/blog/1196400 对于jps较熟悉可以直接查看第二部分的分析 ...
目录 理解停止Java进程的本质 应该如何正确地停止Java进程 如何注册关闭钩子 使用关闭钩子的注意事项 信号量机制 总结 理解停止Java进程的本质 我们知道,Java程序的运行需要一个运行时环境 ...
-
hdu5391-Zball in Tina Town-威尔逊定理(假证明)
Tina Town is a friendly place. People there care about each other. Tina has a ball called zball. Zba ...
-
用python来分割图片
程序思路: 此次程序主要是利用PIL(Python Image Libraty)这库,来进行图片的处理.PIL是一个功能非常强大的python图像处理标准库,但由于PIL只支持python2.7.如今 ...
-
mongodb数据到MySQL数据库 的迁移步骤
废话少说,直接上干货. 1.mongoexport -d shengyang -c testData -f _id,x,name,name1,name2 --type=csv -o new.csv 用 ...
-
HDU 6351 Naive Operations(线段树)
题目: http://acm.hdu.edu.cn/showproblem.php?pid=6315 Naive Operations Time Limit: 6000/3000 MS (Java/O ...
-
@JsonInclude(JsonInclude.Include.NON_NULL) 加在对象上
@JsonInclude(JsonInclude.Include.NON_NULL) public class ViewWorkermessage implements Serializable { ...
-
手工命令行 搭建 hadoop 和 spark 环境
环境准备:3台CentOS7,64位,Hadoop2.7需要64位Linux 192.168.20.161 192.168.20.162 192.168.20.163 三台机器分别叫host01. ...
-
Centos 7 下 Mysql 5.7 Galera Cluster 集群部署
一.介绍 传统架构的使用,一直被人们所诟病,因为MySQL的主从模式,天生的不能完全保证数据一致,很多大公司会花很大人力物力去解决这个问题,而效果却一般,可以说,只能是通过牺牲性能,来获得数据一致性 ...
-
java 对一个字符串去重,即去掉字符串内重复元素
String str ="abc|efa|abc|efa|abc"; String str1 = str.replaceAll("(?s)(.)(?=.*\\1)&quo ...
-
PHP文件上传与下载
一:上传文件与报错 $_FILES 超全局数组,包含了有关上传文件的所有信息! 而且,这个数组中只包含文件相关信息,其他数据依然在$_POST里面$_FILES是一个二维数组,每上传一个文件,都是数组 ...
-
java深拷贝与浅拷贝
1.调用Object类的clone方法必须实现Cloneable接口,clone属于浅拷贝. 2.可以通过java的反序列化机制进行深拷贝. 3.可以直接用apache提供的一些包进行深拷贝和浅拷贝, ...