API delay
We're running 8.1.1 at the moment and I'm experiencing a long delay (15 - 27 seconds or so) whenever I make an API call. The nature of the call doesn't seem to be relevant, and it's pretty consistent at least over short periods of time. From some of the forum posts I'm getting the impression that authentication is factor in the delay, but I'm wondering if what I'm seeing is "normal" or if there's anything that can be done to increase the response time from TC. I'm making a single call (starting a build) so caching the TCSession credentials probably wouldn't lead to much of an improvement (I read of 5 minute time out). It just seems a bit long for doing a basic login operation.
Thanks.
Ben
Please sign in to leave a comment.
Hi, please clarify the following details:
1) Are you making a REST API call?
2) What is your authentification method?
also, please try to create several thread dumps from Administration->diagnostics at the time it stucks and attach them here.
Seregy,
1) Yes, this is doing a rest call: <server>/httpAuth/app/rest/buildQueue and Posting XML to start the build
NOTE: for the threadump I made a different call <server>/httpAuth/app/rest/builds/buildType:CorpRoot_PatchTest_Bob/tags/ but the delay is the same.
2) I'm sending the basic auth headers. That's the only one I know of that works. Is there another option for API auth? I'd love to not have to use basic if it's possible.
It's worth noting that the calls always work, but they just seem to take an inordinantly long time to complete.
The attached threaddumps are before during and after the call to tags as above.
Thanks,
Ben
Attachment(s):
apiThreadDump.zip
I see you are doing call "/httpAuth/app/rest/builds/buildType:CorpRoot_PatchTest_Bob/tags/". It took about 15 seconds for NTLM security module to log in (in your case). If it takes time for domain controller to respond, it makes sense to create a local (TC) user, which authentification is instant.
Well that's just it, the accoutn that I'm passing in the auth headers isn't an AD user. It's just a regular TC user. The TC server is setup to use AD Auth, so that the rest of us can log in, but the automation users are just in TC. Is it trying to auth those against AD as well, then waiting for failure before checking it's internal system?
-Ben
TC has several authentification interceptors. And NTDomainLoginModule goes before DefaultLoginModule. If you enable debug-auth logging in Administration->Diagnostics, you will be able to see that.
Forgot to add: you can go to TC_CONF\config\auth-config.xml and change the order in which authentification modules are applied.
Sergey,
Changing the order did the trick! Response time dropped from 17 seconds to 2. Thanks for the tip!
-Ben