Strange behaviour when value set to MaximumPorts in }clientProperties

Post Reply
kavitha2002
Regular Participant
Posts: 158
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Strange behaviour when value set to MaximumPorts in }clientProperties

Post by kavitha2002 » Fri Jun 28, 2019 12:26 pm

Hello Everyone,

In my application I am using the REST Api to login to TM1 which is

'http://localhost:8000/api/v1/ActiveSession/User' its working fine when MaximumPorts set to zero in }clientProperties cube.

When I set 3 or more value to MaximumPorts, then REST Api request returns 401 unauthorized error for some REST Api request and sometimes showing error code 120 clientMaximumPortsExceeded and sometimes logged in without having problem.

I have tested in 2.0.6 version, its so strange.

What could be the cause of the problem? Any idea??

Wim Gielis
MVP
Posts: 2260
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.8
Excel Version: Office 365 - latest
Location: Brussels, Belgium
Contact:

Re: Strange behaviour when value set to MaximumPorts in }clientProperties

Post by Wim Gielis » Fri Jun 28, 2019 3:47 pm

Maybe several actions from the user require several logins, therefore exceeding the maximum ?
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Set up a TM1 model with AutoHotKey as a service or application

kavitha2002
Regular Participant
Posts: 158
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Strange behaviour when value set to MaximumPorts in }clientProperties

Post by kavitha2002 » Wed Jul 03, 2019 12:01 pm

Maybe several actions from the user require several logins, therefore exceeding the maximum ?
May be true but when I set 3 in MaximumPorts in }clientProperties and oped the architect once and again open the architect sometimes working and sometimes showing ClientMaximumPortExceeded. Same happening for REST api as well.

Actually I gave 3 in MaximumPorts so it should allow 3 sessions right.

lotsaram
MVP
Posts: 3318
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Strange behaviour when value set to MaximumPorts in }clientProperties

Post by lotsaram » Wed Jul 03, 2019 8:26 pm

I don't think it's strange behaviour. It depends on how your Rest based web application is built. The Rest API can handle asynchronous requests from a single user. Although there may be one authentication (logon) the cookie can be reused and separate worker threads initiated for different actions (e.g. run multiple MDX queries at once, run multiple processes at once). It also depends on how your application is cleaning up threads. If it isn't doing any cleanup (and you are then by default relying on HTTPSessionTimeoutMinutes) then even if you aren't doing any asynchronous requests your application may well be creating a separate thread for each new request and just leaving the old ones to expire. Each live thread will count as a "connection" for this metric. (This is also why the "number of connected clients" in Workspace admin console or other tools can seem a bit out of whack.)

This is how the new API works. Port = thread. And there may well be multiple threads per user.

MaximumPorts is really an old hangover from Applix concurrent licensing. As licensing these days is either named user based or PVU based this is completely redundant and of no use (except to break your application ;)
You should leave the setting empty (=0) which is unlimited.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.

kavitha2002
Regular Participant
Posts: 158
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Strange behaviour when value set to MaximumPorts in }clientProperties

Post by kavitha2002 » Thu Jul 04, 2019 11:50 am

Excellent explanation. Thanks for your time and detailed reply.

I will leave the setting empty(=0)

what is the role of 'HTTPSessionTimeoutMinutes' here. My understanding is this variable is for REST api session timeout. Am I right??

Post Reply