开发者

DB Connection Timeout simulation

开发者 https://www.devze.com 2023-03-25 23:29 出处:网络
Is there an way to simulate a db connection timeout? I\'m encounter开发者_高级运维ing problems with a timeouted db connection on a productive system and need to simulate a similar situation. One way

Is there an way to simulate a db connection timeout?

I'm encounter开发者_高级运维ing problems with a timeouted db connection on a productive system and need to simulate a similar situation.


One way that this could be simulated is by killing the connection directly in the database:

Oracle:

select * from v$session
where machine like '%machinename%'
order by sid desc

-- SID, SERIAL
alter system kill session '1080,16345'


Try to connect to a non-existing host or port, and you will get the connection timeout.

0

精彩评论

暂无评论...
验证码 换一张
取 消