Re: SM Timeout issue (736 Views)
Reply
Frequent Advisor
presidioam
Posts: 47
Registered: ‎06-28-2011
Message 1 of 4 (763 Views)

SM Timeout issue

Hello,

 

today one user reported me to have some issue with his idle time in Service Manager 7.11.

He told me that his Service Manager session goes in timeout despite he is using the software.

Can you please tell me how to verify this and how to fix this issue?

 

Thanks and best regards.

HP Expert
lisajo
Posts: 480
Registered: ‎02-15-2010
Message 2 of 4 (736 Views)

Re: SM Timeout issue

Hi

If you look in the sm log do you see the person's user id and is there an error message close to it . If so can you post here

Thank you

LIsa

"HP Support
If you find that this post or any post resolves your issue, please make sure to mark it as an accepted solution."
Honored Contributor
DimitarPeychev
Posts: 297
Registered: ‎11-01-2011
Message 3 of 4 (723 Views)

Re: SM Timeout issue

Hi, it might be because of the parameter control the timeout for heartbeat of client-server communication
 

timeoutok

Indicates that even though the server believes the client to be dead, the session will not be terminated. The above message will still be written to the log, indicating that the client may be dead. The default is to terminate the server session when the client is believed to have disconnected.


timeoutlimit:nn

Specifies the number of minutes to wait until the client is thought to be dead. The default is five minutes.


timeramount:nn

Specifies the interval at which the client will contact the server. This parameter is specified in the user sc3user.ini file. The default interval is 15 seconds.

How does the Service Manager Heartbeat mechanism work?

Response

In Service Manager clients there are heartbeat mechanisms in place for every client connection that pings every 15 seconds by default. The heartbeat can be seen as the  <getMessages> items that appear in the sm.log when HTTP POST messages are sent from the browser if the "debughttp" parameter is enabled:
 
e.g. service.do?name=getMessages&timestamp=1245783775554 .
 
The heartbeat is implemented in two areas that are independent of one another and are not synchronized:
 
1) Between the browser and the app server hosting our Web Client.  This "heartbeat" does two things:
a) responsible for displaying Service Manager (SM) server messages that have been retrieved by the Web client to the user (e.g. 'ticket 123456 has been updated')
 
b) simulates activity between browser and Web Client so as not to prematurely timeout the user based on the web.xml <session-timeout> value. It is a common misconception that users will be timed out based on whatever the value of <session-timeout> in web.xml is. This is not true because the heartbeat simulates activity that prevents web.xml's <session-timeout> executing.
 
2) Between the application server hosting our web client and the Service Manager server. This heartbeat maintains the session established by the server to service the web client requests. This heartbeat simulates activity between Web Client and server so as not to prematurely timeout the user based on sm.ini's sessiontimeout value.
 
 

FIG.1 heartbeats implementation

  1.        |                                   |                                      |
           |<----------- hb 1 ---------- >|<--------- hb 2 ---------------->|
           |                                   |                                      |
        browser               Web Client                                SM
HP Support
If you find that this or any post resolved your issue, please be sure
to mark it as an accepted solution.
Please also give kudo if you find it interesting :)
Honored Contributor
DimitarPeychev
Posts: 297
Registered: ‎11-01-2011
Message 4 of 4 (722 Views)

Re: SM Timeout issue

Hi again,

very imoprtant o check  are also the "Inactivity timer" and "session-timeout" in sm.ini and web xml

 

What is the difference between the "Inactivity timer" and "session-timeout" ?

Response

Overview on timeout parameters:
The sessiontimeout has nothing to do with user activity (or inactivity).
It's only there to remove sessions that ServiceCenter (SC)/Service Manager (SM) thinks are there but are really not.
For example if you open a session from a client and your network connection goes down
(cable unplugged) then there is no proper removal of the session. So if the heartbeat is
not noticed for the amount of time set in the sessiontimeout the session will then be removed.

The inactivity timer is for real existing client connections where the operator is really
not doing anything anymore.
So for example 30 minutes inactivity timer and 15 minutes for sessiontimeout
will not remove real sessions after 15 minutes but only after 30 minutes.
We currently advise to set the session-timeout to 2-3 minutes.
 
 
1) Inactive Timer
Definition:          
System Administration – Ongoing Maintenance – System – Start Inactive Timer; setup parameters here
Start process inactive.startup in system status
 
The inactivity timer is measuring requests from the client to server
If they do not happen for the defined amount of time then you get disconnected.

Inactive timer will check if user is busy. It’s related to the “IDLE Time” in the system.status.
The log looks like:
  4240(  5864) 06/07/2012 23:56:11  RTE I User falcon has been idle for 2 minute(s) 27 second(s) and marked as terminated.
  4240(  5864) 06/07/2012 23:56:11  RTE I killInactiveSessions: elapsed time 0 milliseconds, warning 0, setTerminateStatus 1.
  4240(  7816) 06/07/2012 23:56:14 JRTE I Termination signal: 0
  4240(  2888) 06/07/2012 23:56:14 JRTE W Could not kill thread 706E5CCDE4B883BCD6EFED086078A096. (not in the map)
  4240(  2888) 06/07/2012 23:56:14 JRTE W Session 706E5CCDE4B883BCD6EFED086078A096 is no longer valid. Sending SOAP fault
  4240(  2888) 06/07/2012 23:56:14 JRTE W Send error response: Session no longer valid
  4240(  7816) 06/07/2012 23:56:14  RTE I -Memory : S(3597048) O(1184644) MAX(4945708) - MALLOC's Total(463247)
  4240(  7816) 06/07/2012 23:56:14  RTE I Thread termination in progress
  4240(  7816) 06/07/2012 23:56:14  RTE I User falcon has logged out.  Still licensed ( 1 session remaining )
  4240(  7816) 06/07/2012 23:56:14  RTE I Thread termination cleanup complete
  4240(  2888) 06/07/2012 23:56:17 JRTE W Session 706E5CCDE4B883BCD6EFED086078A096 is no longer valid. Sending SOAP fault
  4240(  2888) 06/07/2012 23:56:17 JRTE W Send error response: Session no longer valid

2) sessiontimeout in sm.ini
Reaching this timeout means server didn't get any message (including heart beat) from client.
For example, if server is running a long time query and at that time there is no interactions between client and server,
the client could be killed by server.
 
The log is like:
      My client (74CD443A88473718CF8A8BC06144CBC1) has died, no heartbeat
 
7.11p18 will report this after the execution is done, and 9.30p4 will report immediately.
 
3) session-timeout in web.xml
 
The session-timeout is monitoring a heartbeat. The default heartbeat signal
time is 15 seconds and has nothing to do with activity of the user.
If the web.xml
session-timeout is set to 60 minutes (btw 2-3 minutes is currently advised)
then this means that a session is only removed after the server missed 60x4=240
heartbeats from the corresponding client.
 
This parameter checks if there is heartbeat or any message between browser and tomcat.
Browser log file reports:
Jul 24, 2012 1:54:56 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [HP Service Manager Web] in context with path [/webtier-9.40d0615] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
                at com.hp.ov.sm.client.webtier.WebController.getSession(WebController.java:3773)
                at com.hp.ov.sm.client.webtier.WebController.timeoutSession(WebController.java:4187)
server log:
   584(  6752) 07/24/2012 13:51:27  RTE I Base login Response: 1.685 -- RAD: 0.153  JS: 0.453 Log:0.000 Database: 1.079  LDAP: 0.000 (CPU 0.951)  application:login,cleanup
   584(  6752) 07/24/2012 13:51:28  RTE I -Memory : S(3989712) O(1254144) MAX(5243856) - MALLOC's Total(508831)
   584(  5260) 07/24/2012 13:52:25 JRTE W Session 70958A21023383FF27A6CA7F675C7C0B is no longer valid. Sending SOAP fault
   584(  5260) 07/24/2012 13:52:25 JRTE W Send error response: Session no longer valid use rtecall("msg"... cannot avoid this issue for web client

HP Support
If you find that this or any post resolved your issue, please be sure
to mark it as an accepted solution.
Please also give kudo if you find it interesting :)
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.