Posts

Showing posts with the label trace

SAP Buffers and Buffer Synchronization

SAP Buffers and Synchronization In a distributed architecture, the database and instances can be on separate servers. Therefore the access to database from the application instances would have to resort to inter server communication over the network. If the data is not changed very frequently and not too big, caching it at the application's memory can improve the access speed. Apart from improving the access speed, caching will prevent the load on the database. By reducing the database load, the need to add more CPU (and memory) can be avoided, which in turn reduces the licensing cost. SAP buffers are a part of the application memory that conceive this concept. Buffer Synchronization SAP buffers are local to each instance. When a change is made, the application instance where the transaction ran can be made aware of the change easily. However, it is very important to ensure that the changes are communicated to other application instances to ensure validity of the buffered in...

Recording Table Changes in SAP

One can log table changes on Control tables and Customizing tables in SAP. Logging is useful when you want to trace back when a particular table was changed. This function is only recommended on customizing tables and not on master or application tables as there is performance overhead. When table recording is activated, the number of database updates will be double as a "before image" of the record that is being changed is maintained. To enable table logging: Call transaction SE13, enter the table name. Click on change and in the next screen, go to technical settings. Check the option "Log data changes" Save the and activate the changes To activate table logging: Table logging doesn't begin until rec/client profile parameter is set. Set teh profile parameter rec/client (on all instance profiles) to OFF: Generally no recording (non-client specific tables for which logging option is checked are always logged) nnn: Logging for client-specific tables ...

XPI Inspector -- New Tool to Troubleshoot XI/PI Problems

Image
You might be familiar with Web Diagtool (or Web Trace Collector) , which lets you increase trace level on certain components and collects them as a zip file. XPI Inspector is a similar tool specifically designed for troubleshooting problems on XI or PI XPI Inspector has pre-defined set of examples to make trace collection simpler. Here is the list.   Example 1   (CPA Cache):   Example 2   (Module Processor):   Example 3   (AFW Security):   Example 4   (TREX):   Example 5   (SOAP Adapter):   Example 6   (JDBC Adapter):   Example 7   (File Adapter):   Example 8   (Mail Adapter):   Example 9   (RFC Adapter):   Example 10  (JMS Adapter)   Example 11  (Authentication & SSL)   Example 12  (Performance Monitoring)   Example 13  (ISpeak Adapters)   Example 14  (SR & UDDI)   Example 15  (MarketPlace Adapter)   E...

ICF Recorder for Error Analysis

ICF recorder provides debugging facilities to analyse HTTP problems when using Internet Communication Framework (ICF). It also allows reproduction of the error whenever you need from the details logged into the database. The recorder logs the exchange of HTTP(S) documents. To activate ICF Recorder Call transaction SICF Go to "Edit" -> "Recorder (If ICF acts as server to http requests) and/or Go to "Client" -> "Recorder" (If ICF acts as client making http requests) Choose "Activate Recording" Enter the URL prefix Ex: "/sap/bc/bsp/sap" Specify the recording time and lifetime (to indicate the amount of time this data remains in the database for troubleshooting) You can use "User-Dependent" option to set the recording for a particular user. You can use "Recording Level" to specify "Request" or "Request+Response". To deactivate ICF Recorder Call transaction SICF Go to ...

Log SQL Statement for JDBC Receiver Channel

If you require the sql statement generated by the JDBC adapter for any error analysis, you can set logSQLStatement to true in "advanced mode" section of the communication channel. This will cause the generated statement to show in details page of the audit. This parameter is not supported for productive use and is meant for testing only.

Tracing HTTP Response Time of Dispatcher and SAP J2EE Server Node

Image
You can trace the HTTP response time on dispatcher by enabling HttpTraceTime property. Similar information can be captured on SAP J2EE server node by enabling LogResponseTime property. These two parameters can be set in HTTP Provider service . The trace will be written at <path to>/j2ee/cluster/server0/log/system/httpaccess/responses.<n>.trc in the following format: [Jul 27, 2011 7:49:19 PM] - 127.0.0.1 : GET / HTTP/1.1 302 0 [ 150 ] d[ 300 ] c[30132] 150 ms shown in the trace refers to the response time of the server node. 300 ms shown in the trace refers to the response time of the dispatcher. If you want to capture additional details when the response time has crossed a certain threshold, you can set TraceResponseTimeAbove parameter in  HTTP Provider service . A negative value for this parameter will have no effect. Additional trace will be written in the default trace file when the response time is >= property's value and HttpProvider service i...

Controlling Log Files

The number of defaultTrace files and whether or not they should be archived is controllable. To change the number of defaultTrace files, go to Server --> Kernel --> Log Manager and change DefaultTraceFile_Count . To archive the trace files, go to Server --> Services --> Log Configurator --> Properties Tab and set ArchiveOldLogFiles to ON. These logs are archived at /usr/sap/<SID>/j2ee/cluster/server<X>/log/archive. Ensure that there is enough free space maintained as these files are not deleted automatically. Also delete the xml file defined in Logviewer_LogDirectoryWriteToFile property in Log Viewer Service regularly.

Enqueue Server Max Requests and Enqueue Table Size

If you start noticing I/O or memory errors in the dev_enqio_* trace file, the enqueue server is being overloaded. enque/server/max_requests and enque/server/max_query_requests determine the number of requests that can be processed parallely. These numbers should atleast be equal to the number of work processes or the number of Java threads (in all instance). enque/table_size determines the size of the enqueue table. If there is a memory error in the trace files, increase enque/table_size. Sample calculations of the max_*request parameters based on number of WPs/threads and enqueue table size: For ASCS Total number of WPs = 1000 Lock Table Size = 500MB enque/server/max_query_requests = 1000 enque/server/max_requests = 1000 + 500 * 25 = 13500. #The additional 25*500 is for handling replication in HA systems. enque/table_size = 500000 For SCS Total number of Java Threads per node = 350 Total number of nodes = 3 Lock Table Size = 32MB enque/server/max_query_re...

JMSProvider Transaction Logs

The JMSProvider service writes its transaction logs (*.tx) to the directory maintained in Server --> Services --> JMS Provider --> Properties --> Property 'transactionStorePath'. By default it is set to the home directory of the J2EE installation. Make sure that this directory has enough free space and has rw permissions on <sid>adm.

Switching Off JARM Data Collection

Image
JARM collects response time of application which may be helpful in troubleshooting performance problems to improve user experience. However JARM itself causes performance overhead for data collection . It may be turned on for troubleshooting and kept off during normal use by performing the following steps: 1. Logon the j2ee engine via Visual Administrator. 2. Go to server_XXX -> services -> Performance Tracing. 3. Select the properties tab 4. Change value of property jarm/switch from on to off, then press update and save for all nodes.

JDBC Driver Trace

An advance mode parameter can be configured for JDBC Communication Channels to trace JDBC API calls on a per-CC basis. In Integration Directory, edit the JDBC Communication Channels and dd the following parameter to the the advanced mode parameter table: jdbcDriverTraceLevel The following values are supported for this parameter: none - no tracing is performed (default) medium - all JDBC API method invocations performed by the channel are traced without any parameters and return values full - all JDBC API method invocations performed by the channel are traced including parameters and return values In addition, set the severity for the location "com.sap.aii.adapter.jdbc.sql.jdbctrace.trace" to "Info" in the Visual Administartor's Log Configurator service. Do not forget to remove the parameter after trace is collected.

SAP XI: Tracing AFW Jobs

You can trace the AFW jobs on these locations: com.sap.aii.af.[service|lib].scheduler