oracle 连接超时问题处理

集群中有模块提示连接超时。

分析排查

看日志

提示信息:
connection time out
说明很可能是数据库连接池满了。

用工具连下数据库,连不上说明满了

连了一下发现果然连不上。是数据库满了。

解决方案

sql解决方案

找dba查看链接情况。 停掉一些影响较小的链接。

查看机器用户的链接数:

select username , count(*), machine from v$session where username is not null group by  username, machine order by username;

查看连接的sid和serial#:

select SID,SERIAL#,username , count(*), machine from v$session where username is not null group by  SID,SERIAL#,username, machine order by username;

杀掉session:

alter system kill session '741,12797';

配置和代码解决方案

1、调整配置文件中的连接数,以及超时释放时间。
2、调整数据库集群支持的链接数。
3、查找代码中,链接泄露的代码。

猜你喜欢

转载自blog.csdn.net/enthan809882/article/details/106328341
今日推荐