Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
I need to know how the thread works in ThingWorx, how the server gets busy and hoe does the internal queue process the threads later, for the application and when is contented to a DB.
Solved! Go to Solution.
Hello,
Can you specify whether you are referring to database connection to the ThingWorx model in terms of saving and persisting properties and entities or the JDBC connector connections?
The ThingWorx Model database connection will open the number of threads up to the limit configured in the server.xml under maxThreads. Threads can be reused by multiple requests if using a newer version of Tomcat. Older versions of Apache had a ‘Blocking’ IO that prevented re-use of threads until a client transaction completed.
JDBC database connections function differently however. This relies on the max connection set in the JDBC connector Thing and does not place additional requests into a queue until a connection frees up. Additional requests will wait for the amount of time configured on the query service itself before cancelling.
-Saeed
Hello,
Can you specify whether you are referring to database connection to the ThingWorx model in terms of saving and persisting properties and entities or the JDBC connector connections?
The ThingWorx Model database connection will open the number of threads up to the limit configured in the server.xml under maxThreads. Threads can be reused by multiple requests if using a newer version of Tomcat. Older versions of Apache had a ‘Blocking’ IO that prevented re-use of threads until a client transaction completed.
JDBC database connections function differently however. This relies on the max connection set in the JDBC connector Thing and does not place additional requests into a queue until a connection frees up. Additional requests will wait for the amount of time configured on the query service itself before cancelling.
-Saeed
Hi @vguevaraperez.
If the information provided by @smanley answered your questions, please mark it as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon