Solved

Inactive sessions not clearing

Posted on 2004-10-07
3
4,395 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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Create index on View 27 53
PL/SQL Two statements 6 50
select query - oracle 16 82
Pl/SQL Query 31 62
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
This video shows how to recover a database from a user managed backup

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now