Our application (.ear) is deployed in the weblogic application server version 10.3.0
We are facing a thread stuck issue wherein an application thread gets stuck and the weblogic server goes into the WARNING state. The thread that gets stuck is actually
initiated by our application and it gets stuck because our application is waiting for a response to a request that it has sent to an external system. The thread stuck timeout value is 10 min and the response is not received before that leading to the thread getting stuck.
We want to achieve the following :-
Want to set some connection timeout parameter in the server say for 2 sec. When timeout period expires and no response is received some exception should be thrown automatically which should be caught by our application . This will help our application gracefully exit and avoid the thread stuck.
Please suggest where in the server we can find such a parameter.
(We found that in Tomcat server there is a connection-timeout parameter in the server.xml which helps serve the same thing we want to achieve. We want something similar in weblogic application server)
I dont think you have something like that which will throw exception but you can filter logs to get the stuck threads when they appear or can increase the stuck thread timeout period from 10mins to more.(Home >Summary of Servers >Server1>Tuning>Stuck Thread Max Time> 600secs default you can change it to higher values.
you can also take a thread dump using wlst from time to time and check for STUCK threads and can stop the application using wlst if you encounter one.