Our .NET web app uses ODP.NET for connections and its Oracle User for connecting to database is "webuserOracle". That web app always close connections and dispose connections.
However, on our Oracle 10g database, we see that sessions and processes values of Oracle User "webuserOracle" is always high, as they woudn't close or die.
We have decided to set up on Oracle profile for "webuserOracle" in order to limit the connect time up to 5 minutes.
CREATE PROFILE profile_webuserOracle LIMIT CONNECT_TIME 5;
ALTER USER webuserOracle PROFILE profile_webuserOracle;
For a web app, limiting connection to 5 minutes, means that the user could interact, say, 2 hours with the web app. The limit of 5 minutes is only for events triggered (like clicking a button) to connect to database. 5 minutes for everything that happened between Con.Open and Con.Dispose:
Dim con As OracleConnection = oraConexion()
''' There'll be a limit of 5 minutes to run the code here
A Session in Oracle is allways an open and close connection?