Session Provider not deleting expired sessions

Session Provider not deleting expired sessions

Postby lkrueger » Wed 05 Nov 2014 19:05

We use the devart dotConnect for MySQL as a Session Provider. However, it does not seem to clear out old sessions. On our development server we have over 41K entries into the session table and only 15 of them haven't "expired".

Maybe there is a parameter I have to set? Although to be honest, the documentation is very vague here. All I could find was connectionStringName and writeExceptionsToEventLog

Or maybe I have to clear out old sessions myself?

Any help would be appreciated!
Regards
lkrueger
 
Posts: 6
Joined: Mon 14 Jul 2014 17:40

Re: Session Provider not deleting expired sessions

Postby Pinturiccio » Fri 07 Nov 2014 15:18

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 1953
Joined: Wed 02 Nov 2011 09:44

Re: Session Provider not deleting expired sessions

Postby Pinturiccio » Thu 20 Nov 2014 16:49

We have added the enableExpiredSessionAutoDeletion and expiredSessionAutoDeletionInterval parameters for deleting expired sessions to the session-state store provider definition in the web.config file.

1. enableExpiredSessionAutoDeletion parameter enable automatic deletion of the expired sessions;
2. expiredSessionAutoDeletionInterval parameter specifies the interval between automatiс deletions of expired sessions.

Here is an example of the corresponding record in the web.config file:
Code: Select all
<sessionState
    cookieless="true"
    regenerateExpiredSessionId="true"
    mode="Custom"
    customProvider="MySqlSessionProvider">
    <providers>
      <add name="MySqlSessionProvider"
        type="Devart.Data.MySql.Web.Providers.MySqlSessionStateStore,
                Devart.Data.MySql.Web, Version=8.3.293.0, Culture=neutral,
                PublicKeyToken=09af7300eec23701"
        connectionStringName="MySqlServices"
        enableExpiredSessionAutoDeletion="true"
        expiredSessionAutoDeletionInterval="1800"/>
    </providers>
</sessionState>


These changes are available in the new build of dotConnect for MySQL 8.3.293, which you can download from http://www.devart.com/dotconnect/mysql/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?t=30804
Pinturiccio
Devart Team
 
Posts: 1953
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for MySQL