Keep Session alive

Keep Session alive

Postby Marco Droll » Wed 08 Oct 2014 10:41

Hello!

We are using a Direct-Connection with Pooling on, Entity Framework 4.0, .Net 4.0 and facing the problem that the session vanishes after aprox 4 minutes of inactivity.
Due to the fact that we're using the Oracle VPD-Feature we need to execute a stored procedure for the current session in order to activate roles for the current user.
This procedure is quiet expensive performance-wise, so i'd like to know if there's any way to keep the same session.

We recently upgraded from verson 6.30.202.0 in which the session was kept infinit to version 7.9.333.0 which causes the problems.

Setting the "Connection Liftime" property in the connection string did not change the behaviour.

Thank you in advance!

With regards

Marco Droll
Marco Droll
 
Posts: 9
Joined: Fri 21 Dec 2012 09:10

Re: Keep Session alive

Postby Pinturiccio » Thu 09 Oct 2014 15:09

"Connection Liftime" cannot increase the lifetime of the session. Instead it can decrease it. when a connection is put to the pool, a check is performed if the actual connection lifetime exceeds the "Connection Liftime" value. If it exceeds, the connection is deleted from the pool. Default value of "Connection Liftime" is 0, which means no limit. For more information, please refer to http://www.devart.com/dotconnect/oracle/docs/?Devart.Data.Oracle~Devart.Data.Oracle.OracleConnectionStringBuilder~ConnectionLifetime.html.


If you want to have the same session, you may keep it open. You can also set the "Min Pool Size" connection string parameter to 1. In such case the pool will always have at least one instance of your session.
Pinturiccio
Devart Team
 
Posts: 1891
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle