SAP Fiori應用發生超時錯誤的一個可能原因
Yesterday I spent almost the whole day to resolve a timeout issue in one CRM Fiori application “My Lead”. Finally the root cause makes me not know whether to launch or to cry. I share with you this story, in case you might meet with similar issue, you do not need to spend much time to debug as I did yesterday.
In CRM “My lead” application, end user can insert several products to a lead at the same time.
User can click “+” button to open product value help, then select the products they need to add to the lead.
The issue is, when the testing colleague uses the test user ( we say user A ) to insert the products to the lead, they will meet with time out error below, when the amount of selected products exceeds 15.
Much to my surprise, when I use my own user ( user B ) to test, the issue could not be reproduced, it only took 1 seconds to finish the insertion with 20 products selected. Why?!
My analysis process
(1) I debugged the insertion with test user A. The product insertion to lead is done by CRM function module CRM_ORDER_MAINTAIN. The product insertion within this FM is done via a LOOP internally, which means each product is inserted separately. For totally 20 product insertions, I trace the execution time, it took around 40 seconds to finish, which is definitely not acceptable.
(2) I use transaction code SAT to trace the single product insertion with test user A, it took around 2 seconds. It seems the execution time increases linearly with the number of product to be inserted. Also the 2 seconds for a single product insertion is not acceptable – too slow!!
(3) Unfortunately, through the SAT record, I cannot find a bottleneck of the execution. The complete execution, each stack, is very slow. But when I debug with my own user, each stack is very very fast.
What are possible elements which causes the difference
(1) I had made assumption that the two users are testing on different Lead transaction type. Different transaction type could have different callback registered, so when the lead is saved, different program could be executed. This element is eliminated after my check – both user are working on exactly the same transaction type.
(2) The backend implementation has some code like
CALL FUNCTION 'XXXXX'
EXPORTING
iv_user_name = sy-uname
The reason I made this assumption is since the execution differs based on user, so there must be some handling in code which is based on user name.
I did spend much time to go through the code and the answer is no.
Final answer
I felt frustrated and almost gave up. Suddenly I am thinking about the possibility of user setting difference??
Bingo! The testing user has switched on One order framework event trace via the user parameter CRM_EVENT_TRACE.
This trace functionality is expensive which leads to the overhead of the whole program execution. And since it is done centrally in the one order framework, it is the reason why I didn’t find any hint in my application code.
Lessons learnt
So here is lessons learnt:
Next time if I meet with the similar issue that the performance on the same application with different users varies greatly, besides the two mentioned checkpoints in chapter “What are possible elements which causes the difference“, there is last but not least one: check whether there are different users settings between the two users( for example tcode SU01, or any other customizing in your specific area ).
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2718382/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SAP Fiori應用裡出現http request錯誤的原因分析HTTP
- SAP Fiori應用沒能從Fiori Launchpad啟動的一個可能原因及分析過程
- 引起SAP WebClient UI頁面出現超時(time out)錯誤的另一個原因WebclientUI
- 部署 SAP UI5 應用到 SAP BTP 時遇到的 fiori not found 錯誤訊息UI
- SAP CRM Fiori應用冗餘round trip的原因分析
- 一個典型的使用 SAP Cloud Application Programming 模型開發的 Fiori 應用CloudAPP模型
- SAP Fiori Launchpad 應用的兩個實用技巧分享
- 使用 SAP fiori-tools-proxy 時遇到的錯誤訊息 - invalid version
- 使用View modification擴充套件SAP Fiori應用的一個案例View套件
- 如何分辨 SAP Fiori Launchpad 裡的真假 Fiori 應用
- SAP Fiori應用索引大全索引
- SAP Fiori應用索引大全工具和 SAP Fiori Tools 的使用介紹索引
- 使用SAP CDS view快速建立一個Fiori應用,管理Service OrderView
- SAP CRM Fiori應用和SAP JAM的整合配置
- 如何免費試用SAP的Fiori應用
- SAP Fiori應用的搜尋問題
- 使用 SAP Fiori Tools 部署 SAP UI5 應用到 ABAP 伺服器時遇到的各種錯誤和解決辦法UI伺服器
- System.AggregateException: 發生一個或多個錯誤.....Exception
- http代理504閘道器超時錯誤原因介紹HTTP
- SAP Fiori 應用 Manage Workflows for Purchase RequisitionsUI
- SAP CRM中介軟體下載equipment時遇到的一個錯誤UI
- 關於 SAP Fiori 應用的離線使用
- 無法新增某個relationship給SAP CRM Product category的一個可能原因Go
- 用 React 結合 SAP UI5 Web Components 來開發 SAP Fiori 應用ReactUIWeb
- SAP CRM Fiori 應用裡無法根據當前文件建立 Followup Opportunity 的原因分析Unity
- 在沒有任何前端開發經驗的基礎上, 建立第一個 SAP Fiori Elements 應用前端
- SAP Fiori Elements 應用裡和 Fiori 3 相關的外觀設定
- SqlException 當前命令發生了嚴重錯誤 應放棄任何可能產生的結果SQLException
- 如何分析SAP UI5應用的undefined is not a function錯誤UIUndefinedFunction
- 無法在SAP Fiori UI上新增擴充套件欄位?原因可能就在這裡UI套件
- 如何在SAP Fiori應用裡使用React componentReact
- SAP Fiori Elements 應用的 manifest.json 檔案執行時如何被解析的JSON
- 如何讓SAP S/4HANA的Material Fiori應用配置到Fiori Launchpad裡
- 使用 Vue 3 時應避免的 10 個錯誤Vue
- SAP Fiori應用裡日期格式的顯示奧祕
- go fiber:發生內部錯誤時統一返回json格式GoJSON
- SAP系統合併後整合:應避免的4個錯誤
- SAP Fiori 應用 url 中的 DraftUUID 引數的含義RaftUI