Convertigo Public Knowledge base

HTTP Session Timeout between multiple projects call

The HTTP session timeout value set in a project defines the inactivity time (in seconds) of incoming HTTP sessions. It is set by the first project call that creates the session. All other calls to another projects will still use the timeout value.

In order to have different session timeout between the calls, you have to end the session before you make another call. You can use the Remove session Step at the end of your Sequences, for example. It applies only when the different calls are stateless.

If calls must be stateful, you can create a SequenceJS Step in your Sequence and write the following code:

context.httpSession.setMaxInactiveInterval(<time_in_seconds>);

This will change, on-the-fly, the session timeout for the next Sequences execution.

 

The following will immediately end the current session:

context.httpSession.setMaxInactiveInterval(0);

 

A negative time indicates the session should never timeout ( This could cause memory leak):

context.httpSession.setMaxInactiveInterval(-1);

(c) Convertigo 2023 https://www.convertigo.com