Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member67734
Discoverer

This blog provides some useful hints about XI/PI runtime cache refresh from the following three aspects in order to avoid the interruption on message processing caused by cache refresh.

    1. When XI/PI runtime caches need to be refreshed or cleared
    2. The potential risk when perform cache refresh
    3. The proper way to perform cache refresh
 

In the first chapter, XI/PI runtime cache overview is introduced via a summery sheet and two diagrams.  In the third chapter, the documents related XI/PI runtime caches are provided.

  

1      XI/PI Runtime Cache Overview

The following summary sheet and diagrams provide the overview of XI/PI runtime caches.

Cache Name

Cache Content

Cache Type

Location

Used By

Cache Update

XI 3.0 / PI 7.0

PI 7.1 above

Automatically

Manuallyh3. 2      Hints about XI Runtime Cache Refresh

2.1    When perform cache refresh manually


There are three types of cache refresh on XI/PI critical runtime caches "IS ABAP cache", IS Java/Mapping Runtime cache" and Adapter Engine CPA Cache":

    Full/Complete cache refresh will reconstruct cache contents completely, which takes longer time than delta/partial refresh and will delay message processing. Complete/full cache update is required only in case of emergency when there is inconsistency in PI runtime caches.
    Partial/Delta cache refresh will refresh change lists with the status new and failed which will delete the relevant objects first and then adds the current objects to DB tables, which can usually solve all known issues like missing objects or incorrect object versions in caches.
    Single repository/ESR object cache refresh, which is usually used to refresh a known problem IR/ESR object by its object ID and software component ID. The following object types can be refreshed via single repository/ES repository object cache refresh. Single repository object cache refresh is usually used to solve "NO_MAPPINGPROGRAM_FOUND or "RESOURCE_NOT_FOUND" error occurred at mapping step.
        1. MAPPING: Interface/operation mapping
        2. XI_TRAFO: Message mapping
        3. TRAFO_JAR: Imported archive
        4. RepBProcess: Integration process
        5. AdapteMetaData: Adapter metadata
      h5. 2.1.1    Risk & Warning

      The cache refresh will cause failure of

        1. All messages under processing
      1. When Integration Engine RUNTIME parameter CACHE_DIRTY_READ set as 0, which will terminates message processing if a pipeline service is used and the cache refresh updates objects for this specific service. In worse case, queues in SMQ2 can be stopped with error text like "Queue stopped due to cache update", which will block message processing at Integration Engine and needs to unlock stopped queues in SMQ2 manually.
      2. When full/complete cache update failed on cache instances
        1. Some messages under processing
      1. When Integration Engine RUNTIME parameter CACHE_DIRTY_READ set as 1 (default value), which will not interrupt message processing during cache refresh. This is achieved by simply using the status of cache before the cache refresh for the evaluation. Whether this results in outdated data being used depends on whether the messages concerned are in any way connected with the changed data. However, some of the objects may not yet be available in the XI cache during cache refresh and configuration errors may occur for the messages.
      2. When delta/partial cache update failed on cache instances

      The failed asynchronous messages can be restarted from SXMB_MONI manually or by the job running report RSXMB_RESTART_MESSAGES automatically.  The failed synchronous messages must be resend from sender systems. For detailed information, please refer to note 1337797.

      Do not perform cache refresh when there are messages under processing, especially there are synchronous messages under processing.

      *Partial/Delta cache refresh is preferred, which is enough to update all changed IR and ID objects as well as to solve the issues of missing or incorrect version of ID/IR objects in caches. </p><p>Complete/full cache update is required only in case of emergency when there is inconsistency in PI runtime caches. Please grant the authorization for complete/full cache update only to PI system administrator according to note 1122879.*

      h5. 2.1.2    Things to do when perform cache refresh manually

      To avoid cache refresh failed, please follow steps 1, 2, 3, 4, 5 and 6 before performing XI/PI cache refresh manually when necessary.

      1. Run "cache connectivity test" via RWB Component Monitoring first

      2. Check the setting of the Integration Engine RUNTIME parameter CACHE_DIRTY_READ via transaction SXMB_ADM/SXMB_ADMIN. CACHE_DIRTY_READ=1 is the default and preferred setting.

      3. Please consider to increase the value for the following parameters when there are large number of ID objects (for example: more than thousand) needs to be updated to XI/PI runtime caches in order to avoid cache fresh failed due to timeout error or http_communication_failure.

        1. JVM parameter: -Dorg.w3c.www.protocol.http.connections.timeout=600000. This parameter is valid for performing CPA cache refresh via https connection. For detailed information, please refer to note 1365480.
        2. The properties "ServletInputStreamTimeout" and "ServletLongDataTransferTimeout"of J2EE http service via NetWeaver Administration Page (Only valid for XI 3.0 & PI 7.0, but not for PI 7.1). For detailed information, please refer to note 807000.
        3. The timeout option of RFC destination INTEGRATION_DIRECTORY_HMI via transaction SM59

      4. For XI/PI Integration Server system or XI/PI non-central adapter engine system consisting of the central and dialog instances, please check the following properties of CPA Cache service com.sap.aii.af.cpa.svc are defined using the hostname and port number of Web dispatcher or hardware load balancer.

        1. SLD.selfregistration.hostName
        2. SLD.selfregistration.httpPort
        3. SLD.selfregistration.httpsPort

      5. Check the user who perform cache refresh has enough authorization.

        1. Having role SAP_XI_APPL_SERV_USER and the authorization S_RFC_ADM is contained in this role. For detailed information, please refer to note 1177441.
        2. Having role SAP_XI_ADMINISTRATORABAP and the authorization S_XMB_AUTH is contained in this role, which is required for "Full/Complete Cache Refresh" of PI 7.1.  For detailed information, please refer to note 1122879.

      6. Check the following XI/PI system users are not locked via transaction SU01.

       

      *Default Name </p></td><td width="188"><p>ABAP Role </p></td></tr><tr><td><p>Directory service user </p></td><td width="187"><p>XIDIRUSER / PIDIRUSER </p></td><td width="188"><p>SAP_XI_ID_SERV_USER </p></td></tr><tr><td><p>Repository service user </p></td><td width="187"><p>XIREPUSER / PIREPUSER </p></td><td width="188"><p>SAP_XI_ID_SERV_USER </p></td></tr><tr><td><p>Integration Server service user </p></td><td width="187"><p>XIISUSER / PIISUSER </p></td><td width="188"><p>SAP_XI_IS_SERV_USER </p></td></tr></tbody></table><p> </p><p>7. To perform cache refresh, please follow the steps listed in the table.</p><table border="1" cellspacing="0" cellpadding="0" width="577" style="font-size: 1.2em"><tbody><tr><td rowspan="2" width="88" valign="top"><p align="center">Cache Name</p></td><td colspan="2" width="489" valign="top"><p align="center">Manually Cache Refresh</p></td></tr><tr><td width="248" valign="top"><p align="center">XI3.0/PI7.0</p></td><td width="241" valign="bottom"><p>PI 7.1 above</p></td></tr><tr><td width="88" valign="top"><p>Integration Server  ABAP Cache</p></td><td width="248" valign="top"><p>1. Transaction SXI_CACHE -><br />XI Runtime Cache -> Start Delta Cache Refresh<br />2. Transaction SXMB_IFR -> Administration Link -> Repository/Directory/Runtime Tab -> Cache Overview -> Click "Partial Cache Refresh " button on a cache consumer "_INTEGRATION_SERVER_" </p></td><td width="241" valign="top"><p>1. Transaction SXI_CACHE -> Runtime Cache -> Start Delta Cache Refresh<br />2. Transaction SXMB_IFR -> Administration Link -> Repository/Directory/Runtime Tab -> Data Cache Overview -> Click "Partial Cache Refresh" button on a data cache  "Integration Server (ABAP)" </p></td></tr><tr><td width="88" valign="top"><p>Integration Server  Java Cache / Mapping Runtime Cache</p></td><td width="248" valign="top"><p>1. Transaction SXI_CACHE -><br />XI Runtime Cache -> Start Delta Cache Refresh / Start Complete Cache Refresh<br />2. Transaction SXMB_IFR -> Administration Link -> Repository/Directory/Runtime Tab -> Cache Overview -> Click "Partial Cache Refresh " button on a cache consumer  "_INTEGRATION_RUNTIME_"</p></td><td width="241" valign="top"><p>1. Transaction SXI_CACHE -> Runtime Cache -> Start Delta Cache Refresh / Start Complete Cache Refresh<br />2. Transaction SXMB_IFR -> Administration Link -> Repository/Directory/Runtime Tab -> Data Cache Overview -> Click "Partial Cache Refresh" button on a data cache   "Mapping Runtime"</p></td></tr><tr><td width="88" valign="top"><p>Adapter Engine Cache (CPA Cache)</p></td><td width="248" valign="top"><p>1. Http://<host><port>/CPACache/refresh?mode=delta<br />2.  Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Cache Overview -> Click "Partial Cache Refresh" button on the cache consumer "af.<SID>.<Hostname>"</p></td><td width="241" valign="top"><p>1. Http://<host><port>/CPACache/refresh?mode=delta<br />2.  Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Data Cache Overview -> Click "Partial Cache Refresh"  button on the cache consumer "af.<SID>.<Hostname>"</p></td></tr><tr><td width="88" valign="top"><p>Value Mapping Group Cache</p></td><td width="248" valign="top"><p>Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Cache Overview,  Click  "Refresh Cache" button on "Value Mapping Group Cache" </p></td><td width="241" valign="top"><p>Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Virtual Machine Cache Overview, Select "Value Mapping Group Cache" and Click on "Refresh Selected Caches" button</p></td></tr><tr><td width="88" valign="top"><p>Value Mapping Value  Cache</p></td><td width="248" valign="top"><p><br />Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Cache Overview,  Click  "Refresh Cache" button on "Value Mapping Value Group Cache" </p></td><td width="241" valign="top"><p><br />Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Virtual Machine Cache Overview, Select "Value Mapping Value Cache" and Click on "Refresh Selected Caches" button</p></td></tr><tr><td width="88" valign="top"><p>Value Mapping GUID Cache</p></td><td width="248" valign="top"><p><br />Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Cache Overview,  Click  "Refresh Cache" button on "Value Mapping GUID Group Cache" </p></td><td width="241" valign="top"><p><br />Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Virtual Machine Cache Overview, Select "Value Mapping GUID  Cache" and Click "Refresh Selected Caches" button</p></td></tr><tr><td width="88" valign="top"><p>Business System Cache (SAP Systems using Web Service Communication)<br /><SID>_<CLT></p></td><td width="248" valign="top"><p>N/A</p></td><td width="241" valign="top"><p> 1. On SAP sender/receiver business system via Transaction SXI_CACHE -> Runtime Cache -> Start Delta Cache Refresh<br />2. On SAP sender system and PI system, run transaction WSTASKCHECK to make sure no pending SOAP RT configuration tasks.</p></td></tr></tbody></table><p> </p><p>8. To do single ES/repository object cache refresh, please follow the steps listed in the table.</p><table border="1" cellspacing="0" cellpadding="0" width="565" style="font-size: 1.2em"><tbody><tr><td width="565" valign="bottom"><p align="center">Refresh Single ES/Repository Object*Do not perform XI/PI objects transport when there are messages under processing, especially during the peak load period.

      h5. 2.2.2    Things to do after ID/IR objects transportation
      1. Check the cache notification and cache update status in RWB Cache Monitoring and make sure both cache notification status and update status have green lights on all type of caches (ABAP, JAVA, and Adapter Engine Cache). If the status of any cache notification or cache update is flag with red color, please follow "How to handle XI/PI cache" guide as well as XI/PI troubleshooting guide to solve the issues during cache notification and update.
      2. For Web Service scenarios in PI 7.1, the Web Service RT Configuration needs to be checked via WSTASKCHECK in PI system and ABAP sender system to make sure there is no pending SOAP RT configuration task. If there is any pending configuration tasks, please schedule job SAP_SRT_CFG_PENDING_TASKS via WSTASKCHECK. For detailed info, please refer to note 1259998.
      3. Restore business processes in sender / receiver systems
      h4. 2.3    When UN-deploy a customer developed module for a adapter type
      2.3.1    Risk & Warning

      *SLD Cache Location </p></td><td colspan="2" width="500" valign="bottom"><p align="center">Clear SLD Cache</p></td></tr><tr><td width="248" valign="bottom"><p align="center">XI 3.0 / PI 7.0</p></td><td width="252" valign="bottom"><p align="center">PI 7.1 and above*

      ABAP stack

      1. Run transaction SE37 and execute function LCR_CLEAR_CACHE or
      2. Run transaction SE38 and execute report RLCR_CLEAR_CACHE

      Java stack

      Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Cache Overview -> Click "Refresh Cache" button on SLD Cache

      Transaction SXMB_IFR -> Administration Link -> Runtime Tab -> Virtual Machine Cache Overview, Select SLD Cache and  Click "Refresh Selected Caches" button

      h4. 2.5    Adapter Engine Cache

      Adapter Engine cache store the URLs of Adapter Engines including the central and non-central Adapter Engines, which is used by the Integration Engine to pass a message to the central or non-central Adapter Engine messaging system when the receiving system uses a JCA based adapter channels.

      h5. 2.5.1    Risk & Warning

      Without clear Adapter Engine cache upon the change to Adapter Engine URL, this may cause:

        1. The failure of message processing when the hostname and port number of Adapter Engine URL has been changed
        2. Uneven load distribution across multiple Java instances when the Adapter Engine URL has been changed to point to the hostname and port number of a Web Dispatcher or a hardware load balancer
      h5. 2.5.2    Things to do when Adapter Engine URL has been changed

      To remove the changed Adapter Engine URL from Adapter Engine cache, please run transaction SXI_CACHE, goto menu "AE Cache" and delete the cache content of AE URL.  The AE URL will be loaded automatically to AE cache when the first time a message requires it.

      h4. 2.6    RFC Adapter Cache

      The RFC Adapter has a cache for the metadata of function modules. This means it caches the definition of function modules, structures and other data types.

      When the particular data is needed during runtime first time, the cache is filled from the configured RFC metadata repository. Once if a particular metadata has entered the cache, all the subsequent references to this function module are directed to the cache and no lookups to the RFC metadata repository are made for this type of metadata.   Each communication channel has its own cache for RFC function metadata.

      When a function module is changed in the backend, the changes are not published to the runtime RFC adapter cache.  For detailed information, please refer to note 730870.

      h5. 2.6.1     Risk & Warning

      When the import/export list of a RFC function is changed in the backend system, the RFC function metadata will be out of date, which will cause:

        1. The failure of message processing in XI/PI system or
        2. The runtime error of RFC function at the backend system
      h5. 2.6.2    Things to do when change the import/export list of RFC function module in the backend systems
      1. Reload the RFC function module metadata into IR/ESR.
      2. Change the mapping program correspondingly and activate the change.
      3. Check the cache notification and cache update status in RWB Cache Monitoring and make sure both cache notification status and update status have green lights on all type of caches (ABAP, JAVA, and Adapter Engine Cache). If the status of any cache notification or cache update is flag with red color, please follow "How to handle XI/PI cache" guide as well as XI/PI troubleshooting guide to solve the issues during cache notification and update.
      4. Clear the RFC adapter cache by restart the related RFC channel in RWB channel monitoring. Restart RFC adapter service "com.sap.aii.adapter.rfc.svc" in NWA can also clear all RFC adapter caches, but it will affect all RFC channels.
      h4. 2.7    IDoc Metadata Cache

      IDoc adapter cache stores IDoc metadata at runtime as soon as a message needs this metadata for the first time. There is no automatic refresh when metadata is changed. IDoc adapter cache needs to be cleared manually via IDX2 or report IDX_RESET_METADATA.

      h5. 2.7.1    Risk & Warning

      When IDoc metadata in sender or receiver systems are changed either via upgrade or development, the IDoc metadata in IDoc adapter cache will be out of data, which will result in:

        1. IDoc messages from a sending system may fail during converting IDoc to XML at IDoc adapter in XI/PI system
        2. IDoc messages to a receiving system may fail at inbound posting in a receiving system

      For detailed information, please refer to note 907957 and 1157385.

      h5. 2.7.2    Things to do when IDoc metadata changed in the backend systems
      1. Import IDoc metadata into IR/ESR
      2. Change the mapping program correspondingly and activate the change
      3. Check the cache notification and cache update status in RWB Cache Monitoring and make sure both cache notification status and update status have green lights on all type of caches (ABAP, JAVA, and Adapter Engine Cache). If the status of any cache notification or cache update is flag with red color, please follow "How to handle XI/PI cache" guide as well as XI/PI troubleshooting guide to solve the issues during cache notification and update.
      4. Clear the old IDoc metadata from IDoc Adapter Cache via IDX2 or report IDX_RESET_METADATA
      h3. 3      Related documentation

      3.1    XI Directory Cache


      3.1.1    XI Directory Cache in Detail

      A very detailed documentation can be found at:

      [https://wiki.wdf.sap.corp/wiki/pages/viewpage.action?pageId=10289567 | https://wiki.wdf.sap.corp/wiki/pages/viewpage.action?pageId=10289567]

       

      h4. 3.2    How-To-Guide

      How to handle caches in XI/PI will help you to

        1. To understand how data is entered and updated in caches in the Integration builder, the runtime and the adapters
        2. To know where caches are used
        3. To learn how to troubleshoot cache problems
      h5. 3.2.1     How to Handle Caches in SAP XI 3.0

      http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1a69ea11-0d01-0010-fa80-b47a79301...

      h5. 3.2.2     How to Handle XPI Caches in SAP NetWeaver 7.0 (2004s)  

      http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0332b2a-eb97-2910-b6ba-dbe52a01b...</p>h4. 3.3    Troubleshooting Guide
      3.3.1    Troubleshooting Guide - SAP XI 3.0/SAP NW 7.0, chapter 11 Caches

      http://service.sap.com/instguidesNW04 ->Operation -> SAP XI

      http://service.sap.com/instguidesNW70 -> Operation -> Process Integration

      h5. 3.3.2    Troubleshooting Guide - SAP NetWeaver PI 7.1, chapter 10 Caches

      http://service.sap.com/instguidesNWPI71 -> Operation -> Process Integration

      h4. 3.4    Useful notes

      *SAP Note <strong> #</strong></p></td><td width="479" valign="top"><p>Short *Description

      1383148

      Error in cache connectivity test

      1372866

      SAP_XI_ADMINISTRATOR added S_XMB_AUTH,value=CACHE, activity=01

      1377033

      How to perform a Single Repository Object Cache Refresh

      1365480

      Error in full cache refresh in https mode

      1342064

      Insufficient monitoring for SXI_CACHE

      1337797

      XI cache: FAQ about parameter CACHE_DIRTY_READ

      1259998

      FAQ: Central Web service configuration using PI

      1177441

      XI cache: Error when reading HTTP destination

      1157385

      IDoc adapter: IDocs with status 03 and in XI not transferred

      1117249

      Incomplete Registration of PI components in SLD

      1122879

      Introduction of a restricted permission for cache refresh

      907957

      IDoc adapter: Metadata inconsistent after update

      897656

      NO_MAPPINGPROGRAM_FOUND after you import a SWCV

      881276

      CPADirectoryCacheException during J2EE Engine startup

      865137

      Full CPA Cache refresh can cause duplicate channel execution

      857890

      Cache status after deleting SWC or hierarchy relationship

      807000

      Http requests are not fully read after timeout

      764176

      Error in XI due to inconsistent SLD contents

      741214

      Troublesh. during cache update of the J2EE CPACache service

      732681

      XI 3.0: Buffering SLD data

      730870

      FAQ XI 3.0/ PI 7.0/ PI 7.1 RFC Adapter

      h3. 4      Thanks

      I would like to show my appreciation to the colleagues who support me and provide useful information during my blog creation.

        1. PI development colleagues: Frank Admas, Dimiter Dimitrov, Mandy Krimmel, Shibin S, and Nikhil Rao
        2. PI China CoE team colleagues: Jessie Han, Josef Schmidt and Tristan Hu

       

      8 Comments