Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Inactive sessions not clearing

Posted on 2004-10-07
3
Medium Priority
?
4,676 Views
Last Modified: 2013-12-11
Hi,

Oracle 9.2.0.5 on solaris
Application is J2EE through application servers with connection pooling.

During stress testing, a large number of sessions were created. Though for last few days, only a few sessions have been active
but the inactive sessions are not clearing up. we are using "SQLNET.EXPIRE_TIME=10" in sqlnet.ora but it seems to be of no help in this scenario.

we are not using the default listener.

how can we make the inactive sessions clear in this environment ?

TIA,

grora
0
Comment
Question by:grora
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
BobMc earned 1000 total points
ID: 12248098
SQLNET.EXPIRE_TIME wont log off inactive sessions, it only detect sessions which have abnormally terminated, and cleans them up.

To terminate sessions after periods of inactivity, you would need to setup some profiles for your users, and set the idle_time parameter. Beware though that this doesnt fully terminate the client session either, but marks it as SNIPED. The session will stay like this until the user attempts to use the connection again, when they will be informed the session has been terminated, and any pending transactions will be rolled back.
If the user never retries the connection, it will remain SNIPED until you bounce the instance.

I dont know if there is something you can set on the application server that can resolve this for you.

HTH
Bob
0
 
LVL 23

Expert Comment

by:seazodiac
ID: 12248526
grora:

are you looking at this through v$session view?

this is ok, active sessions are NOT immediately cleaned out as they disconnected.
I find out this is true esp. when the session are opened via JDBC .
0
 
LVL 48

Expert Comment

by:schwertner
ID: 12256849
The NON DEAD sessions (if deleted) will be killed only by the first attempt for connection from the client. In fact these are live connections and there are clients on the other side. You can kill them due the long period of inactivity. The reason is that every session uses 2-5 MB RAM. 300 sessions = 0.8 - 1.5 GB RAM!!!!

"SQLNET.EXPIRE_TIME=10" sends probe packages to the clients and waits for answer. If there is no answer, it kills the session immediatelly.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

598 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question