Long delay when starting a deployed BW6 application.

Long delay when starting a deployed BW6 application.

book

Article ID: KB0075662

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Symptoms:
BW applications take a long time to start on Linux/Unix machines but start quickly under Windows. Problems with resolving xsd used in the project. Please take 2-3 thread dumps with an interval of 1 min each.
Please refer to the below to take thread dumps:
https://blog.fastthread.io/2016/06/06/how-to-take-thread-dumps-7-options/

for ref top 2 ways of collecting thread dumps is :
1. kill -3 <pid>
where 
pid: is the Process Id of the application, whose thread dump should be captured

Example: Kill -3 37320
2. ‘jstack’ is an effective command line tool to capture thread dumps. jstack tool is shipped in JDK_HOMEbin folder. Here is the command that you need to issue to capture thread dump:
jstack -l  <pid> > <file-path>
where pid: is the Process Id of the application, whose thread dump should be captured

file-path: is the file path where thread dump will be written in to.

Example: jstack -l 37320 > /opt/tmp/threadDump.txt


Cause:

After taking a thread dump, the following error is seen.

        at org.eclipse.xsd.impl.XSDSchemaDirectiveImpl.resolve(XSDSchemaDirectiveImpl.java:360)

                at org.eclipse.xsd.impl.XSDImportImpl.importSchema(XSDImportImpl.java:420)

                at org.eclipse.xsd.impl.XSDSchemaImpl.resolveSchema(XSDSchemaImpl.java:2250)

Issue/Introduction

Long delay when starting a deployed BW6 application.

Resolution

Issues with the DNS Configuration
If you cURL the URL e.g: http://www.xxxxx.com/SharedServices/ExceptionXSD  where xxxxx is the company name and following details are your actual xsd locations.

from Windows you will get a response immediately, but the same from a Linux machine may take time to get a response. To address this issue add the following entry in the  /etc/hosts file:  127.0.0.1  <company name> 

Alternatively, you can also use the below properties  in appnode.ini file:

sun.net.client.defaultConnectTimeout=20 (miliseconds)
sun.net.client.defaultReadTimeout=20

These are network properties, also please find below explanation for the same.

These properties specify the default connect and read timeout (response) for the protocol handler used by java.net.URLConnection.
sun.net.client.defaultConnectTimeout specifies the timeout (in milliseconds) to establish the connection to the host. For example, for HTTP connections it is the timeout when establishing the connection to the HTTP server.

sun.net.client.defaultReadTimeout specifies the timeout (in milliseconds) when reading from input stream when a connection is established to a resource

Additional Information

https://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html