Search code examples
sessionclearquestoslc

Why doesn't CQ run OSLC requests paralley?


I run some jenkins job parallely . Each job sends an OSLC API request to ClearQuest webserver in same time. I recognize these requests are resolved sequentially instead of paralelly. Each request takes 5 seconds approx. Response times are:

  1. 1st request take ~5 seconds
  2. 2nd request take ~10 seconds (you see it's waiting 1st to finish)
  3. 3th request take ~15 seconds (you see it's waiting 2st to finish)
  4. 4th request take ~20 seconds (you see it's waiting 3st to finish)
  5. and so on...

So it seems requests are took in a kind of queue. As though it was only one thread to resolve every OSLC rest APIs. Is it possible? With other words: is it possible to increase the number of CQ threads for concurrent OSLC rest api calls?

Update: After a little investigation I see in cq's webserver's access log that requests have arrived to server in same time. So it's sure that CQ is not able to handle requests parallely.

Thx.


Solution

  • Finally I found the answer: I realized that the basic authentication takes a long time like that in CQ indeed. If I use the last session id in the api request then server response in a half second or less. Browser send session id automatically so I need to put [credentials: "include"] into request header.