Home » RDBMS Server » Server Administration » IDLE_TIME terminates the JDBC connection
IDLE_TIME terminates the JDBC connection [message #641577] Tue, 18 August 2015 07:29 Go to next message
sgautam
Messages: 4
Registered: August 2015
Location: INDIA
Junior Member
Hello Experts,

I am new to oracle database and facing some issues.



    When user logged in the application (front end) and fetching the data, At the backend V$SESSIONS shows its session INACTIVE. I am not able to understand,why?


      I have set the value of IDLE_TIME parameter to make sessions inactive to snipped. It is working but it also disconnect the datasource.
      After this no user can login from front end until I restart the datasource from application server (JBOSS server). What should I do?

      Please help.

      Thanks!
      • Attachment: sql.txt
        (Size: 0.35KB, Downloaded 70 times)
      Re: IDLE_TIME terminates the JDBC connection [message #641578 is a reply to message #641577] Tue, 18 August 2015 07:47 Go to previous messageGo to next message
      Michel Cadot
      Messages: 65377
      Registered: March 2007
      Location: Nanterre, France, http://...
      Senior Member
      Account Moderator

      Quote:
      When user logged in the application (front end) and fetching the data, At the backend V$SESSIONS shows its session INACTIVE. I am not able to understand,why?


      INACTIVE means the session is not currently executing some code.
      For instance, between 2 SQL statements the session is inactive.

      Quote:
      I have set the value of IDLE_TIME parameter to make sessions inactive to snipped. It is working but it also disconnect the datasource.


      What do you mean by "datasource"?

      Quote:
      What should I do?


      If you are using connection pooling on your application server, you should NOT use IDLE_TIME.
      To avoid people at front end stay connected to the application server when idle, this later one should disconnect them from it, not the Oracle database snip the application server session.

      [Updated on: Tue, 18 August 2015 07:47]

      Report message to a moderator

      Re: IDLE_TIME terminates the JDBC connection [message #641744 is a reply to message #641578] Fri, 21 August 2015 08:39 Go to previous messageGo to next message
      sgautam
      Messages: 4
      Registered: August 2015
      Location: INDIA
      Junior Member
      Thanks Michel for your response

      Quote:
      If you are using connection pooling on your application server, you should NOT use IDLE_TIME.


      Yes, we are using connection pooling on application server.
      As per your suggestion, I will not use IDLE_TIME.


      Quote:
      What do you mean by "datasource"?


      Datasource means the jdbc connection between application and database which is created through Application server (JBOSS server).
      When I use IDLE_TIME parameter it terminates the connection between application and database then no user can login into application until I disable and re-enable the datasource from JBOSS aplication server (through Enable and disable button on GUI of JBOSS).

      Quote:
      INACTIVE means the session is not currently executing some code.


      When user fetch,insert,update or delete the data from application (front end) then at the back end session state is INACTIVE. That's why I am confused.


      Thanks!







      Re: IDLE_TIME terminates the JDBC connection [message #641745 is a reply to message #641744] Fri, 21 August 2015 09:01 Go to previous messageGo to next message
      BlackSwan
      Messages: 25848
      Registered: January 2009
      Location: SoCal
      Senior Member
      > That's why I am confused.
      When Connection Pooling is used, it is non-trivial to associate any specific EndUser action with any specific session within the database.
      Also realize that you must query at the EXACT TIME when the SQL is executed is order for the session to be flagged as ACTIVE.

      >When user fetch,insert,update or delete the data from application (front end) then at the back end session state is INACTIVE.
      So either you ran your query at the wrong time or were looking at the wrong session.
      Re: IDLE_TIME terminates the JDBC connection [message #641748 is a reply to message #641745] Fri, 21 August 2015 09:28 Go to previous messageGo to next message
      sgautam
      Messages: 4
      Registered: August 2015
      Location: INDIA
      Junior Member
      Thank you BlackSwan


      But Why IDLE_TIME terminates the database connection when session is snipped. Why we need to restart the JDBC connection.


      Thanks!
      Re: IDLE_TIME terminates the JDBC connection [message #641750 is a reply to message #641748] Fri, 21 August 2015 09:35 Go to previous messageGo to next message
      BlackSwan
      Messages: 25848
      Registered: January 2009
      Location: SoCal
      Senior Member
      sgautam wrote on Fri, 21 August 2015 07:28
      Thank you BlackSwan


      But Why IDLE_TIME terminates the database connection when session is snipped. Why we need to restart the JDBC connection.


      Thanks!


      You shoot yourself in the foot by setting IDLE_TIME, then come here to complain about the pain that results from your own stupidity.
      Oracle is only doing what YOU told it to do.
      If you remove IDLE_TIME disconnection, most of your problems will go away.

      Problem Exists Between Keyboard And Chair.
      Re: IDLE_TIME terminates the JDBC connection [message #641753 is a reply to message #641750] Fri, 21 August 2015 09:47 Go to previous message
      sgautam
      Messages: 4
      Registered: August 2015
      Location: INDIA
      Junior Member
      Thanks a lot BlackSwan!
      Previous Topic: Share tablespace between OLTP and OLAP
      Next Topic: ORA-01652 error
      Goto Forum:
        


      Current Time: Sat Feb 17 16:20:05 CST 2018

      Total time taken to generate the page: 0.02222 seconds