- Back to Home »
- Managing stale sessions
Posted by : Arjun Lagisetty Thursday, January 9, 2014
Overview:We have all had this problem with long running jobs. When the network connection has a problem or an agent gets disconnected from master and work repository momentarily, we end up with stale sessions.
How do we deal with these annoying stale sessions. There are many solutions lets deal with them by category.
Tricky part about stale sessions is being able to identify them. You can identify stale sessions only when you check the target database for the sql sessions triggered by ODI sessions. Other way is check the log for connectivity drop. I will be addressing how to handle each one the problems below.
Emergency quick fix solution: I know you got this issue identified it as a stale session you are tearing your hair out. What to do?
Most of the solutions are written for standalone agents. However, these can be fine tuned for the Java agents as well.
Solving the problem:
Agent restart:This is the most common solution recommended every where else. When you bring down the ODI agent and start it again, it cleans up the stale sessions. Wait for it, there is an easier option see below.
Clean stale sessions:You trigger cleaning the stale session from the operator itself. Pictures speak a thousand words. This is available as on 184.108.40.206. Please confirm this for your studio release. This should cleanup should be suffice.
Preventing the problem:
OdiParams.bat has two little known parameters called retry parameters. What these two little guys do is to help agent to reconnect to the database when the connection is lost. When the connection is lost, below parameters are set up to let the agent retry to connect to the repositories three times max until successful connection every 7 seconds. Please fine tune this to the desired level depending on your network outage schedules.
REM # Connection retry parameters