For customer environment scenarios where threads become blocked or deadlocked, the Integrity server can become unresponsive for users. Historically, the only way to unblock these threads has been to perform a complete restart of the Integrity Server service, effectively shutting down the Java VM and ending the process.
For many customers, there is a tightly-controlled process in place from I.T. teams which require approvals for restarting a service on a Production environment. These approvals can take time to fulfill and the ultimate result is more downtime for users of the system. If there was a way (hidden diagnostic command?) for a customer admin and PTC Technical Support to identify blocking threads and interrupt them to restore system responsiveness without a service restart, that would greatly reduce the amount of time a server is "stuck".
There are the running and kill diagnostic commands but these appear to only work for connections which send statements to the DB (eg. queries, charts, some triggers, etc). Using these commands also requires the server to be responsive since those commands themselves are issued using threads. This request is for a way to interrupt all types of threads within the Integrity Server JVM.
Oracle deprecated the Thread.stop() method because it is dangerous and prone to cause deadlocks:
https://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html
Most other resources online also suggest to implement a way to cancel the threads via background threads checking some variable, then ending the thread once that variable changes:
https://www.baeldung.com/java-thread-stop
https://www.geeksforgeeks.org/killing-threads-in-java/
https://javaconceptoftheday.com/how-to-stop-a-thread-in-java/
It may also be worth exploring some sort of option using a low-level JMX connection to the JVM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.