APM hangs when SAP Gateway (interoperability) gets slow/no response from SAP


 Product(s):APM Implementation and Performance Management
 Version(s):7.11
 Environment:N/A
 Area:N/A
 Subarea:N/A

Problem

User has reported that when using SAP Interoperability, if the SAP connection is lost or extremely slow, the APM Application server performance slows to the point of essentially hangs. There is no error logging associated with the problem, the user had run a packet sniffer (fiddler) to find the problem themselves.

Replication steps.
1.Set-up APM with SAP Interoperability.
2.Run APM, go to SAP Portal
3.Shutdown SAP Test environment that APM is pointing to.
4.Navigate different objects in APM.
5.Note, according to user there was no error logging that indicated a loss of SAP Connectivity.

Upon investigation, we did find that SAP Connection could be reported to the error log by changing the diagnostic error log with a new rule on "Bentley.APM.SAPExternalDataProvider.*" to Warn level as the SAP failed connection messages report at Warn level.

Solution

This was reported as bug VSTS #122567. This item has being worked on by our developers for a fix into release 7.12. We’ve made some significant changes in 7.12 to better handle instances where the connection to SAP have been lost/slow. Basically what you’ll get in 7.12 is the following:

1. ability to set the SAP query timeout as an Ivara configuration setting. This setting is hard coded in 7.11 and is currently set too long, so APM is very slow to report the problem. In 7.11 it takes about 5mins from when the user goes to the SAP Portal to when he/she gets the error message and the client essentially hangs. In 7.12 we can set the timeout to whatever we want, I was thinking about 30s. So no big delay to the end-user in knowing that SAP is down.
2. There will also be a more descriptive error log explicitly stating that the SAP response to APM was too slow and timed out.
3. A dialogue will be launched, once, informing the user that the SAP Gateway connection is down. The user will the be asked to either exit APM and try again later or to continue using APM without use of the SAP Gateway functionality. Once this message has been launched, the SAP Connection check stops, this basically resolves the hang/extremely slow performance that you see in 7.11 when the connection is lost.

These fixes required modelling changes that can’t be hotfixed. So rather than trying to port a partial hotfix only, one that doesn’t really improve the end-user experience, we’re only going to address this in 7.12.

The partial workaround is to update the APM Diagnostic error logging for "Bentley.APM.SAPExternalDataProvider.*" was added and set to Warn level to make the SAP connection timeout noticeable to the APM Admin who can then take action to have the SAP connection checked by the user's SAP Administrators.

.