3

Is there an way to simulate a db connection timeout?

I'm encountering problems with a timeouted db connection on a productive system and need to simulate a similar situation.

paweloque
  • 18,466
  • 26
  • 80
  • 136

2 Answers2

0

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

Terry
  • 310
  • 3
  • 9
0

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'
paweloque
  • 18,466
  • 26
  • 80
  • 136