Solved

Inactive sessions not clearing

Posted on 2004-10-07
3
4,450 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
3 Comments
 
LVL 7

Accepted Solution

by:
BobMc earned 250 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 47

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error executing command from server 6 52
SQL Retrieve Values 4 69
create a nested synonym 4 25
having some issue on pl sql procedure 1 19
Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
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.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup

777 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