6 Replies Latest reply on Oct 11, 2012 8:45 AM by 967672

    Oracle session provider for asp.net - performance issue - Need help


      I am using oracle session provider for asp.net. I am doing small POC using this provider. I have one small web page and multiple images and CSS files. when ever i load the page for every CSS or Image load i see provider is updating the session database. Is there any way we can restrict this functionality as this is going to be a major performnace issue? Appreciate your quick response.

        • 1. Re: Oracle session provider for asp.net - performance issue - Need help
          gdarling - oracle
          It is my understanding that the Session Provider only does what operations the asp.net session framework or your code tells it to do. It sounds as you're describing a generic Session Provider issue not specific to Oracle, in which case you may have better luck posting in a Microsoft forum.

          Comments/corrections welcome,
          • 2. Re: Oracle session provider for asp.net - performance issue - Need help
            Thanks Greg for your reply. I am using Oracle provider, it uses <add assembly="Oracle.Web, Version=, Culture=neutral, PublicKeyToken=89B483F429C47342"/> dll. below is the config entry that i used to access session.

            <sessionState mode="Custom" customProvider="MyOracleSessionStateStore">
                                <add name="MyOracleSessionStateStore" type="Oracle.Web.SessionState.OracleSessionStateStore,Oracle.Web, Version=, Culture=neutral,PublicKeyToken=89b483f429c47342" connectionStringName="my_sessionstate_app_con_string"/>

            This provider is updating session tabes for every file load either CSS, GIF or JS files. below is the error i get when GIF file is getting loaded. In Fidler i can see this response when GIF file is getting loaded. If i remove session provider then GIF file loads with out any issues. Appreciate your quick response.

            OracleException (0x80004005): ORA-12519: TNS:no appropriate service handler found]
            Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck) +2629
            Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) +80
            Oracle.DataAccess.Client.OracleConnection.Open() +7740
            Oracle.Web.OracleConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +119
            Oracle.Web.OracleConnectionHelper.GetConnection(String connectionString) +187
            Oracle.Web.SessionState.OracleSessionStateStore.ResetItemTimeout(HttpContext context, String id) +441
            System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +839
            System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +96
            System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +184

            • 3. Re: Oracle session provider for asp.net - performance issue - Need help
              ahhh... finally able to resolve the issue by my self. I have created custom class thats inherited from OracleSessionStateStore class and overriden ResetItemTimeout method such that it does not call database for CSS, JS or image requests.

              public override void ResetItemTimeout(HttpContext context, string id)
              if (context.Request.CurrentExecutionFilePathExtension.ToUpper() == ".CSS" || context.Request.CurrentExecutionFilePathExtension.ToUpper() == ".GIF" || context.Request.CurrentExecutionFilePathExtension.ToUpper() == ".JS")
              base.ResetItemTimeout(context, id);

              • 4. Re: Oracle session provider for asp.net - performance issue - Need help
                gdarling - oracle

                I thought your complaint was that the provider was accessing the database too much, and that you were having a performance issue. Is that the case? Or is it just that you can't connect, and/or you think the frequent access is causing it? Is it intermittent? Given that it's a simple small page, it seems to be a "can't make a connection" problem rather than a performance problem.

                To the best of my knowledge, 12519 is returned from the listener (as opposed to being a client side error in itself). Basically, the db listener couldn't service your request, and you probably want to have your dba look into that.

                Is it an XE database? If so, this thread might help (increase processes) .. Re: ORA-12519 using thin JDBC client

                To troubleshoot ORA-12519 in general ,
                a) what is the actual connection string , pointed to by the connectionStringName="my_sessionstate_app_con_string". Mostly, the "data source=" part of it, but provide the whole thing (xxxx out the uid and pwd).
                b) are you able to connect using sqlplus from the same home, using that same tnsnames.ora entry?
                c) how many connections are there when you get the error? (select count(*) from v$session where username='<ASPNET_PROVIDER_USERNAME>'; )

                Either way, it's likely a problem that will need troubleshooting on the database side, assuming there is not some sort of connection pooling malfunction going that is eating up all the connections.

                Hope it helps,
                • 5. Re: Oracle session provider for asp.net - performance issue - Need help
                  Hi Greg,

                  oracle provider is updating session time for every resource that is loaded on a web page like .gif, .js, .css etc. So to resolve this issue i created custom component that inherits from Oracle provider and has overridden methods to not update the session time out.

                  • 6. Re: Oracle session provider for asp.net - performance issue - Need help
                    Can you please tell me how this method gets executed. Do I need to call the ResetItemTimeout manually from some where or it gets executed by itself?