Multiple Requests use multiple connection slots to 10.2.2 fp5 Server

Post Reply
fruitninja
Posts: 2
Joined: Mon Nov 20, 2017 8:39 am
OLAP Product: Cognos TM1
Version: 10.2.2 FP5
Excel Version: -

Multiple Requests use multiple connection slots to 10.2.2 fp5 Server

Post by fruitninja » Mon Nov 20, 2017 8:53 am

Hello,

I'm new here and a beginner with TM1, so excuse me if I get some things wrong.
I set up a Tm1 10.2.2 fp5 server to test some code on and almost everything works fine.
My Problem: I have set Max Connections of for example usr1 to "3". In my Code I execute multiple different requests to this server but over the same Client.
After the 4. request I get a 401 error because all the connection slots for this server are used.
As I understood it this shouldn't be the case. It should only take up one slot.
I'm using Restsharp but tried it with WebClient too -> same error.

What am I missing or missunderstanding?

Thanks in advance :)

fruitninja
Posts: 2
Joined: Mon Nov 20, 2017 8:39 am
OLAP Product: Cognos TM1
Version: 10.2.2 FP5
Excel Version: -

Re: Multiple Requests use multiple connection slots to 10.2.2 fp5 Server

Post by fruitninja » Mon Nov 20, 2017 1:13 pm

I found an solution for this if anyone is interested:

I just had to add a CookieContainer to my global RestClient. Now my Code only uses 1 connection slot even with multiple Requests.

Code: Select all

CookieContainer cookies = new CookieContainer();
restClient.CookieContainer = cookies;

Post Reply