SAP MII Administration Handbook

Transcription

SAP MII Administration HandbookApplies to:SAP Manufacturing Integration and Intelligence. For more information, visit the Manufacturing homepage.SummaryThis article discusses monitoring, performance, and troubleshooting for the SAP MII product.Author(s):Michael SolweckiCompany:SAP Labs, LLCthCreated on: May 15 , 2012 (updated 8/31/2012)Author BioMichael Solwecki is a Senior Software Developer for SAP Labs. He is currently part of MII InstalledBased Maintenance and Support (IMS) Team.SAP COMMUNITY NETWORK 2011 SAP AGSDN - sdn.sap.com BPX - bpx.sap.com BA - boc.sap.com UAC - uac.sap.com1

SAP MII Administration HandbookTable of ContentsOverview . 3NetWeaver Monitoring . 3Java System Reports (via NWA) . 3Application / default trace . 3ICM Monitoring. 3Thread dumps . 3Heap dumps / memory analysis . 3Wily Introscope . 3MII Monitoring ( All Releases ) . 4Scheduler . 4System Management - Applet Debugging . 4Data Services - Connection Status . 4Message Services - Message Monitor . 4MII Monitoring (Specific to 12.1 and greater) . 4Admin / Who . 4Data Services - Data Buffer Jobs / Data Buffer Entries. 4Indexing Service . 4Usage Monitoring . 4Transaction Manager . 4LogStatisticsToDB . 5MII Max Performance . 5Query Caching . 5Transaction Persistence . 5Template Caching . 5Transaction Caching . 5File Writing . 5Transaction Execution . 6Best Practices . 6JVM Tuning . 6MII Troubleshooting . 7AS Java Troubleshooting . 7Poor Performance . 7503 Service Unavailable . 8Database Issues . 8Resource Issues . 8Transactions stuck in PENDING state . 9ECC Connectivity . 9Visualization & Web Content. 9Unable to upload JDBC Drivers, Projects, or any other content from the administration screens . 9HttpRequest fails after 10 minutes . 10Related Content . 10Copyright. 11SAP COMMUNITY NETWORK 2012 SAP AGSDN - sdn.sap.com BPX - bpx.sap.com BA - boc.sap.com UAC - uac.sap.com2

SAP MII Administration HandbookOverviewThis document is to discuss the topics of monitoring, performance maximization, and troubleshooting as they pertainto SAP MII. This document is intended to help customers and partners have a guide in keeping their systems in check.The audience for this document should be MII application developers and administrators.NetWeaver MonitoringJava System Reports (via NWA)The Java System Reports option from NetWeaver Administrator gives an overview of memory utilization, averagerequest processing time, active sessions, and thread processing. JSR has improvements in each NW release (7.3 7.1 04s).Application / default traceThese are the standard SAP logs and are viewable via the Log Viewer component in NWA. MII often writes out tothese logs when errors are encountered. If you encounter an issue, the first thing to check should always be theselogs.ICM MonitoringYou can configure ICM to display additional information regarding its processing. See the following links for moreinformation here.NW 04S ICM ParameterizationNW CE 7.1 ICM AdministrationThread dumpsThread dumps are necessary to see exactly what is running on the system. With CE 7.1 and higher, you can also seethe thread activity in the SAP Management Console. On all releases, you can take thread dumps via ManagementConsole and then use the SAP Thread Dump Viewer to see the activity. You can find more information regarding howto take a thread dump here. You can find more information on how to read them by hand here, and via the ThreadDump Viewer here.Heap dumps / memory analysisHeap dumps give you a clear picture of what is in memory at the time the dump was taken. You can use the SAPMemory Analyzer to read the heap dump. Examining your own heap dump is useful because you can see the activethreads in memory, as opposed to just a thread dump that does not expose what is in memory at the time of thedump. Using the two files in conjunction can give you a complete picture of what is happening on the system. Forexample, if your memory usage has spiked and you don’t understand why, you can take a thread dump and heapdump to see which threads are taking up the most CPU and memory, and then drill down into that thread in the heapviewer to see what MII transaction(s) are running at that time.This link shows you how to create a heap dump.Wily IntroscopeWily Introscope is an invaluable tool to analyze your Netweaver instances. It can give you insights into your J2EEengine, as well as provide tracing of requests through the system, activity between the engine and backend systems,and error messages. It is the most commonly suggested tool to help customers review their implementation. It is freeto SAP customers with an active support contract. It is also available as part of SAP Solution Manager. Please reviewnote 797147 for more details here.SAP COMMUNITY NETWORK 2012 SAP AGSDN - sdn.sap.com BPX - bpx.sap.com BA - boc.sap.com UAC - uac.sap.com3

SAP MII Administration HandbookMII Monitoring ( All Releases )SchedulerThis shows all of the configured MII background jobs on the system. You can see the current status for the job(paused, running, stopped) via the Status column there. You can then also see the job history by clicking on the tableimage at the far right of the row of the table. From here you can see the runs of the job, the date/time for each run,the server it ran on, the status, the duration, and additional details.System Management - Applet DebuggingEnabling this will instruct the JVM client to enable tracing in the Java Console for MII applets that are launched fromthat browser window. This is mainly for MII developers to be able to further debug their visualizationimplementations (HTML/Applets).Data Services - Connection StatusThis returns the connection status of the configured and enabled data servers. This also shows the connection type,current status, number of used connections, number of available connections, max number of used connections, andthe max wait time.Message Services - Message MonitorThis screen shows the list of messages received by the MII system as configured by your RFC/IDOC Listenerimplementation.MII Monitoring (Specific to 12.1 and greater)Admin / Wholist of users logged into the instance. ( /XMII/Illuminator?Service Admin&Mode Who )Data Services - Data Buffer Jobs / Data Buffer EntriesThese screens show the list of buffered jobs and entries. If you have chosen ‘asynchronous on error’ for theconfiguration of several action types (such as JCO/JRA) and have experienced some connectivity issues, you will findentries here as they queue up and are retried over time.Indexing ServiceThe Indexing service gives the MII developer the ability to check to see the files that use a specific data server,connection, or credential alias. (see ‘SAP MII 12.1 Monitoring’ document for more details)Usage MonitoringThis feature was added in 12.1 SP6 as a way for customers to get a clear picture on what was running on the system,how often, and how long it took. Usage monitoring covers query templates, transactions, messages, and data servers.You can also see how many requests came in per user. You can see more details regarding this feature in the Service‘SAP MII 12.1 Monitoring’ document.This feature can be enabled / disabled via the System Management - System Properties administration screen of MII.This ability was added in 12.1 SP8.As of 12.2, you can enable / disable this feature per project.I would suggest that this feature be turned off when you are not actively looking to compile this information.Transaction ManagerThis exposes the transaction instance history. You can see every persisted transaction via this screen, with its name,status, mode (asynchronous or synchronous), start time, end time, server ran on, and user. To see transactions here,SAP COMMUNITY NETWORK 2012 SAP AGSDN - sdn.sap.com BPX - bpx.sap.com BA - boc.sap.com UAC - uac.sap.com4

SAP MII Administration Handbookthe transaction must have been executed with a persistence level of ALWAYS or ONERROR. If ONERROR, then an errormust be encountered for the record to be persisted here.LogStatisticsToDBAs of MII 12.1, a transaction request parameter was added called LogStatisticsToDB. When this parameter is set totrue, the transaction will be persisted and additional statistics will be recorded for the actions of that transaction. Thisparameter is only available when passed in to the Runner servlet. It is not meant for scheduled transactions.To view the statistics, you must use the Stats mode of the BLSManager service(/XMII/Illuminator?Service BLSManager&Mode Stats&ID transaction id ). You will see the actions run, the parenttransaction, and the average / min / max / total times of execution.To get the transaction ID, you can use the System Management - Transaction Manager and find the ID for theexecution that you want to see the statistics for.Additional information for this service can be found in the ‘SAP MII 12.1 Monitoring’ document.MII Max PerformanceQuery CachingThis feature is available in all releases. Query caching is configurable for all query template types. You can enable thisfeature in the query template, and then set the duration for how long the cached data should be there. This canpotentially be a big savings for your implementation because it will reduce the amount of calls to external datasources. For example, if you have 100 users using a dashboard that relies heavily on query templates, rather than 100users all hitting that external data source to populate the queries, you’d get 100 users accessing the recently accesseddata. You can set the duration to a small amount (the smallest unit is 1 second) and still see substantial performancebenefits. Transactions can also be cached via Xacute Queries so you can get a performance benefit there as well.Transaction PersistenceThis feature is available in 12.1 and above. Transaction persistence marks whether the runs for that transaction willbe written to the persistence table (XMII TRANSACTIONS). You can control the level of persistence when youconfigure the scheduler or MDO. You can also control the default level of persistence, which is used when calls aremade directly to the Runner or SOAPRunner servlets. The default level is configurable in the System Administrationadmin screen. Lastly, you can set the persistence level of called sub-transactions (via the Transaction Call or DynamicTransaction Call actions) via the Link Editor and the ‘Persist’ property.You should make certain the appropriate level of persistence is set for your scenario. You can see more info regardingthis table with note 1517887.Template CachingThis feature was added in 12.1 SP10 and 12.2 SP4. When enabled, the system will cache loaded query templateobjects and skip the trip to the local data source to get the template information. This is recommended forimplementations that use query templates heavily.Transaction CachingThis feature was added for 12.1. When enabled, the system will cache loaded transaction objects and skip the trip tothe local data source to get the transaction. This is recommended for implementations that use transactions heavily.File WritingThis suggestion applies to all releases 12.0 and up. MII allows you to write files out into its filesystem via severaldifferent actions, such as the Write File action, as well as the HTML / Text / Image Saver actions. To write a file out toan MII web folder, the common syntax is web:// project / folder list / file . So for example if you wanted to writeout an HTML file to the Default project, you could supply the path ‘web://Default/Subfolder/index.html’ and the fileSAP COMMUNITY NETWORK 2012 SAP AGSDN - sdn.sap.com BPX - bpx.sap.com BA - boc.sap.com UAC - uac.sap.com5

SAP MII Administration Handbookwould be saved to MII and then published onto the web server’s filesystem, where it is then available to be served asweb content by Netweaver.The key performance boost you can include here is if you have a scenario where you are generating and saving manyweb files. Using the web:// prefix here automatically publishes the file, however you may not want to do this whensaving so many files because the dispatcher will send a JMS message to tell each node to republish its’ content foreach file. Instead, use the db:// prefix to save the file. You will have to include the WEB folder as part of the pathyourself, but using this prefix will not automatically publish the file to the server. Instead, you can make a subsequentcall to the root of the folders you are writing to, and then only one publish request will occur.For example, you want to write a number of log files to the web folder of the Default project, so you have configuredthe file path as ‘web://Default/LogFiles/log date .xml’, where date is constantly changing, so you have many fileswritten there. Instead of doing this, change the path to ‘db://Default/WEB/LogFiles/log date.xml’, then follow up thisiterated processing with a URL call to ‘/XMII/Catalog?Mode Blowout&Folder Default/WEB/LogFiles’. Depending onyour needs, you can skip the publish call altogether as the publish occurs on NW restart. This is up to you and yourrequirements.Transaction ExecutionIn 12.1 and later, a feature was added to allow transactions to be executed asynchronously. The request parameterfor the Runner servlet is IsAsync. You can do the same with sub-transactions by linking in true to the Async propertyof the Transaction Call or Dynamic Transaction Call actions.When this is set to true, a JMS message is sent by MII with the execution request. The load balancer then decideswhich server node should pick up the message, and then the message is read and the transaction executed.This feature is considered a net performance boost because it helps MII developers optimize their transactions. Thereis a slight hit via the JMS overhead, however there are two clear performance benefits. First, the transactions can beoptimized by separating logic out of synchronous processing. Second, the load balancer helps share the system loadbetween clustered server nodes.One caveat is that you should make sure that the logic you build into the asynchrono

Wily Introscope is an invaluable tool to analyze your Netweaver instances. It can give you insights into your J2EE engine, as well as provide tracing of requests through the