Java Agent Impacts Application Timeout Behaviour

Document ID : KB000076849
Last Modified Date : 10/04/2018
Show Technical Document Details
Issue:
We have an application which is designed to display a form with a timeout error message when the application loses the Spring flow upon timing out on a HTTP call.When CA APM Java Agent is enabled, the application does not follow this timeout behavior. Instead, It would return the user to the homepage and end the application upon a timeout of a HTTP call.

 
Environment:
CA Application Performance Management Java Agent
Cause:
The root cause of the unexpected timeout behavior for this application was due to additional headers inserted by the HttpURLConnectionCorrelationTracer in the httpcorrelation.pbd
Resolution:
As this environment uses a shared CA APM Java Agent directory, deleting the httpcorrelation.pbd file would affect all the other applications monitoring.

To disable the header insertion caused by the HttpURLConnectionCorrelationTracer in httpcorrelation.pbd for this particular application only, provided each application is hosted by a separate JVM, following workarounds can be considered:

Option 1:
========
1. Create a custom weblogic-typical.pbl, with httpcorrelation.pbd removed from the list.
     For example:
       a) Duplicate the weblogic-typical.pbl and rename it to weblogic-typical-nohttpcorrelation.pbl
        b) Then comment out httpcorrelation.pbd from the list of pbds.

2. In the start up JVM option for this specific application, add following property to point to the custom pbl:
-Dintroscope.autoprobe.directivesFile=weblogic-typical-nohttpcorrelation.pbl,hotdeploy

Note: This will overwrite the value configured in the following property in IntroscopeAgent.profile:
          introscope.autoprobe.directivesFile=websphere-typical.pbl,hotdeploy

3. This option will disable the httpcorrelation.pbd entirely

Option 2:
=======
1. Duplicate the httpcorrelation.pbd and rename to, for example, httpcorrelation-noheaderinsertion.pbd

2. In the httpcorrelation-noheaderinsertion.pbd, turn off the HttpURLConnectionCorrelationTracing by commenting out the following line:

#TurnOn: HttpURLConnectionCorrelationTracing

3. Repeat the steps in Option 1, but instead of commenting out httpcorrelation.pbd in the list, replace it with httpcorrelation-noheaderinsertion.pbd.

4. This option will disable the HttpURLConnectionCorrelationTracing, but still keep other tracers in the httpcorrelation.pbd file.


Disclaimer:
---------------
Please note that the settings on the JVM is applicable JVM-wide, meaning all applications started by that JVM. Hence the given workarounds will only address your need if each application is host by a separate JVM. There is no way to disable correlation header or apply custom agent configuration on application level. It can only be done on JVM or Agent level.