Invalid API License exception when using multi-threading

Hi,
To improve the performance of my application, in which I am basically querying many classes about specific information, I thought about multi-threading where a separate thread queries a separate subclass. Now without multi-threading everything works fine. With multi-threading however I get the following agile exception:

Error Message: Invalid API License
Root Cause Exception: Error Code : 60027

After this all my queries fail that had worked independently.

Does anyone know if multi-threading is an issue with Agile?

Add Comment
2 Answer(s)

Hi, Can you post your code about how create the agile session and use it inside a thread?

Agile Angel Answered on February 1, 2016.
Add Comment

@furqantariq1992 Despite what the documentation says about the Agile PLM API being thread-safe, it is not. It fails if it attempts to make two sequential calls to the server at the same time. This is why the documentation says multi-threaded applications must “`syncrhonize“` calls to a IAgileSession. You can fix these errors by ensuring that your calls to IAgileSession are never made at the same time. However, this also means there isn’t much point in making multiple threads with a single IAgileSession. And because the product limits the number of open IAgileSession’s with the same User, the API is even less “thread-capable.”

I know it has been two years since you’ve asked, but this question is the first one when users search for this error and I wanted others to understand what is happening.

Agile User Answered on August 2, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.