关闭
侧边栏

entity manager close

Posted by dbtan on 三月 24th, 2017

前言

entity manager未关闭造成的影响

spring jpa version:1.10.1
底层hibernate: 5.1.0

场景

某些情况需要自行写sql,然后就用到了EntityManager, 用完之后没有显示的close(==|||)

上线后大量请求超时,偶尔有那么几个请求会快

问题定位

首先确定不是数据库正在的查询慢,目前量还很小,然后找到sql去数据库查询系统确认,查询速度接近0ms

然后怀疑是网络延迟,然后找到接收到前端传递过来的参数,想让前端查查log他们发送的时间点,没人搭理...无果

找运维同学要了份error log,一看,果然不是网络问题,大量报获取不到数据库链接,等待获取连接超时,当时心一惊

想着
... ...
<阅读全文>

How To Automate Cleanup Of Dead Connections And INACTIVE Sessions [ID 206007.1]

Posted by dbtan on 九月 15th, 2010

How To Automate Cleanup Of Dead Connections And INACTIVE Sessions [ID 206007.1]


Modified 25-JUN-2009     Type HOWTO     Status PUBLISHED

PURPOSE
-------This note explains the difference between a dead connection and an
INACTIVE session in v$session.  It also discusses the mechanisms
provided to automate the cleanup of each.SCOPE & APPLICATION
-------------------This note is intended for any DBA who wants to automate the cleanup of
dead conn
... ...
<阅读全文>

如何重新配置Oracle的EM Database Control

Posted by dbtan on 十月 25th, 2009

今天打算启用一下Oracle Database 11g的Database Control,但提示如下:

[oracle@test7: ~]$emctl status dbconsole
OC4J Configuration issue. /oracle/product/11.1.0/db_1/oc4j/j2ee/OC4J_DBConsole_test7_ccdb not found.

马上来看一下相应目录下,是否有OC4J_DBConsole_test7_ccdb呢?

[oracle@test7: ~/product/11.1.0/db_1/oc4j/j2ee]$ll -thd OC4J_DBConsole*
drwxr-x--- 10 oracle oinstall 4.0K Jun 30 11:41 OC4J_DBConsole_localhost.localdomain_ccdb
drwxr-xr-x  6 oracle oinstall 4.0K Jun 30 11:18 OC4J_DBConsole

... ...
<阅读全文>

EXP-00091解决方法

Posted by dbtan on 九月 8th, 2009

在EXP导出时,出现EXP-00091报错:

. . exporting table                         FRIEND
..............
                                                       142480 rows exported... ...
<阅读全文>


Copyright © 2009 - 2018 https://www.dbtan.com. All rights reserved.    京ICP备13006977号-1