1. 程式人生 > >loadrunner壓測過程常出現錯誤和處理方法

loadrunner壓測過程常出現錯誤和處理方法

【問題】Error -10776  Failed to find .cfg file

錯誤分析:在loadrunner開啟指令碼的情況下,執行磁碟清理工具,導致執行開啟的指令碼時,提示Mdrv error:Failed to find .cfg file MsgId:MERR-10777
解決方法:從其它資料夾拷貝3個檔案到不能正常執行指令碼的資料夾下:
default.cfg
default.usp
*.prm(將*的位置改為指令碼的名字)
再次執行指令碼,可以正常執行

 

【問題】 Error -13874: missing newline in C:\Users\Administrator\AppData\Local\Temp\brr_YAR.13\netdir\C\TestingResult\StressTest.2\Script\交強險投保\username.dat

錯誤分析:The .dat file needs to have an empty line at the bottom of the file. Also, not sure if all your data is on one line,。
解決辦法:Put your cursor on it innotepad/whatever you are using to edit your dat files, note that is an empty line at the bottom。

 

【問題】Fatal Error -26000: Not enough memory (12320 bytes) for "new buffer in LrwSrvNetTaskItem::AllocSrvNetBuf".  Aborting

錯誤分析:報錯的時候發現工作管理員裡mmdrv.exe 記憶體佔用一直增大,最紅mmdrv.exe崩潰(LR相容C,C語言中記憶體要手動釋放)
解決辦法:注意記憶體的使用,儘量減少變數宣告,new 的變數用完後要及時用free:

 

【問題】回放時lr報錯:Error -26488: Could not obtain informationabout submitted file

錯誤分析:一般情況下上傳檔案指令碼,會報這個錯誤,原因為找不到檔案
解決辦法:錄製完指令碼後,把要上傳的檔案放到指令碼存放的資料夾裡面,重新回放就ok

 

【問題】 Error -26601: Decompression function  (wgzMemDecompressBuffer) failed, return code=-5 (Z_BUF_ERROR), inSize=0,  inUse=0, 

問題原因:這個錯誤為資料包較大,未下載完整或其他原因導致解壓錯誤。
解決辦法:Runtime-setting--->Internet Protocol--->Preferences--->Options--->General->Network buffer size,設定為122880(預設值為12288)
     Runtime-setting--->Internet Protocol--->Preferences--->Options--->General->Default block size for Dom memory,設定為163840(預設值為16384)

 

【問題】Error-26608: HTTP Status-Code=504(Gateway Time-out)

解決辦法:
1.在Vuser Generator中的Tools--->Recording Options...--->Recording--->HTTP-based script--->HTML Advanced按鈕--->在Script type中選擇A script containing explicit URLs only(e.g.web_url,web_submit_data)點選“ok”即可
2.runtime-setting, browser emulation, 取消選擇download non-HTML resources即可

 

【問題】Error -26610: HTTP Status-Code=502 (Bad Gateway) for "https://***s.com/login/login"

 

【問題】Error -27727: Step download timeout (120 seconds) has expired when downloading resource(s).

錯誤分析:對於HTTP協議,預設的超時時間是120秒(可以在Run-time Settings中修改),客戶端傳送一個請求到端還沒有返回結果,則出現超時錯誤。
解決辦法:Set the "Step Timeout caused by resources is a warning" Run-Time Setting to Yes/No to have this message as a warning/error, respectively

 

【問題】 Error -27728: Step download timeout (120 seconds) has expired

錯誤分析:對於HTTP協議,預設的超時時間是120秒(可以在Run-time Settings中修改),客戶端傳送一個請求到端還沒有返回結果,則出現超時錯誤。
解決辦法:首先在執行環境中對超時進行設定,預設的超時時間可以設定長一些,再設定多次迭代執行,如果還有超時現象,需要在“Runtime Setting”>“Internet Protocol:Preferences”>“Advanced”區域中設定一個“winlnet replay instead of sockets”選項,再回放是否成功

 

【問題】 Error -27791: Server "pcisstage.zsins.com" has shut down the connection prematurely

解決辦法:測試中,併發200,300,400人時,LR沒報錯,在併發500人時,LR報錯”Error -27791: Server "172.16.xx.xxx" has shut down the connection prematurely“,同時檢視WEB伺服器日誌:出現這樣一條資訊:

”INFO: Maximum number of threads (200) created for connector with address null and port 8081“

檢視配置檔案引數:

<Connector port="8080" protocol="HTTP/1.1" 
connectionTimeout="20000" 
redirectPort="8443" />

採用的是預設配置,這樣在高併發情況下肯定撐不住,所以修改引數配置如下:

<Connector port="8081" protocol="HTTP/1.1" 
maxThreads="500" acceptCount="500" connectionTimeout="20000" 
redirectPort="8443" />

重新測試,事物全部成功,系統也未報錯。

出現”Error -27791: Server "172.16.xx.xxx" has shut down the connection prematurely“的原因即有可能是作業系統網路執行緒連線資源的原因,也可能是應用軟體的原因,當出現問題,隨時檢視系統日誌,能幫助我們更快的定位問題。

 

【問題6】Error -27796: Failed to connect to server "10.2.9.147:80":

解決辦法:runtime-setting, browser emulation, 將預設勾選的simulate a new vuser on each iteration取消勾選

 

【問題】Error -29724 : Failed to deliver a p2p message from parent to child process, reason - communication error.

 

【問題】Error -30935 "Error: Failed to send data by channels – post message failed."

解決辦法1: 在LR的controller負載生成器的選單欄,單擊【Diagnostics】》configuration》Web Page Diagnostics【Max Vuser Sampling 10%】設定為【Eenable】。
解決辦法2:直接去掉勾選Enable the following diagnostics即可。

 

【問題】Error -35061: No match found for the requested parameter "CorrelationParameter_2". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 256 bytes, use web_set_max_html_param_len to increase the parameter size [MsgId: MERR-35061]

解決辦法1:可以用web_set_max_html_param_len增加引數長度,我試過到99999999共8位
web_set_max_html_param_len("9999999"); // 以消耗系統資源為代價

解決辦法2:還有,你可以在web_reg_save_param_ex( 
"ParamName=CorrelationParameter_3", "LB=c", 
"RB=>\n<table border", 
後面 加上 "NotFound=warning", 儲存編譯下,就不回再提是錯誤了。 主要是自動關聯造成的左右邊界定位不精確,需要儲存的值大

 

【問題】Error -60990 : Two Way Communication Error: Function two_way_comm_post_message / two_way_comm_post_message_ex failed.