Service Desk Practitioners Forum
cancel

Setting timeout for opening a session via the web-api

Highlighted
Paul Mckay_2
New Member.

Setting timeout for opening a session via the web-api

Hi guys,

We are running Service Desk 4.5 sp15

We've developed an application usign the web-api and would like to know if and how we can set the timeout for creating sessions with ApiSDSession.openSession ?

(We're running a couple of servers, and failing over to the secondary if we can't connect to the primary, and we'd like some control over how long it attempts to connet to the primary before giving up.)

Thanks in advance for any help you can give.

Paul.


4 REPLIES
Jonathon Druce
Acclaimed Contributor.

Re: Setting timeout for opening a session via the web-api

Have a look in (assuming default install path) C:\Program Files\Hewlett-Packard\OpenView\service desk 4.5\service pages\conf\web.xlm

And look for the comment ""

It seems that the default is 30 minutes.

Not sure about your second question but earlier in the file there is a parameter clientInputTimeout which may control this.
Vasily Kamenev
Acclaimed Contributor.

Re: Setting timeout for opening a session via the web-api

Hi
That possible only from server side.
Open server_settings.xml and look on 120. In WEB-APi I did the next function
for(i=0;i session = ApiSDSession.openSession(
serversList[i].trim(),
(String) iniKeys.get("login"),
(String) iniKeys.get("password"));
}
Vassili
Paul Mckay_2
New Member.

Re: Setting timeout for opening a session via the web-api

Guys,

Think you've missed my question here. I'm not talking about session timeouts on the server.

What I am talking about is when you try to connect to an application server using the web API, and, say, the server is not running. How long will the client attempt to make a connection before it gives up? Can I configure that web-api CLIENT timeout?

This cannot possibly be a setting I change on the server. This must be done via the web API.

Hope you can help.

Thanks,

Paul.


Vasily Kamenev
Acclaimed Contributor.

Re: Setting timeout for opening a session via the web-api

Hi
That will did attempts so long and so times, how you wrote in your code. if you wrote a cycle for that - that will run and never end if your server never up. :)
if you wrote one time .openSession and get error, than programm ends.
if you describe sleeper and next attempt(S) will try agian connect.

Vassili