cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Do you know about thread counts?

vguevaraperez
12-Amethyst

Do you know about thread counts?

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. 

ACCEPTED SOLUTION

Accepted Solutions
smanley
14-Alexandrite
(To:vguevaraperez)

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

 

 

View solution in original post

2 REPLIES 2
smanley
14-Alexandrite
(To:vguevaraperez)

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

 

 

slangley
23-Emerald II
(To:smanley)

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

Announcements


Top Tags