WSO2 ESB runs on top of WSO2 Carbon platform. Therefore, there are some performance tuning parameters that can be set at the Carbon platform level.
In multi-tenant mode, the WSO2 Carbon runtime limits the thread execution time. That is, if a thread is stuck or taking a long time to process, Carbon detects such threads, interrupts and stops them. Carbon prints the current stack trace before interrupting the thread. This mechanism is implemented as an Apache Tomcat valve. Therefore, it should be configured in the <PRODUCT_HOME>/repository/conf/tomcat/catalina-server.xml
file as shown below.
Code Block | ||
---|---|---|
| ||
<Valve className="org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve" threshold="600"/> |
- The
className
is the Java class used for the implementation. Set it toorg.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve
. - The
threshold
is the minimum duration in seconds after which a thread is considered stuck. The default value is 600 seconds.