loadrunner运行场景时报错“Action.c(55): Fatal Error -26000: Not enough memory...
本帖最后由 chysummer 于 2017-7-29 07:25 编辑Action.c(55): Fatal Error -26000: Not enough memory (122912 bytes) for "new buffer in LrwSrvNetTaskItem::AllocSrvNetBuf".Aborting
网上搜说是脚本变量声明的问题,web_reg_save_param_ex比较耗内存,怎么解决比较好,脚本如下,:
Action()
{
web_add_auto_header("Accept-Encoding",
"gzip, deflate");
web_add_auto_header("Accept-Language", "zh-CN");
web_reg_save_param_ex(
"ParamName=Sign",
"LB=Sign\" value=\"",
"RB=\"",
SEARCH_FILTERS,
"Scope=Body",
LAST);
web_reg_save_param_ex(
"ParamName=rdseq",
"LB=rdseq\" value=\"",
"RB=\"",
SEARCH_FILTERS,
"Scope=Body",
LAST);
web_reg_save_param_ex(
"ParamName=paymentcode",
"LB=paymentcode\" value=\"",
"RB=\"",
SEARCH_FILTERS,
"Scope=Body",
LAST);
、、lr_think_time(0.3);
web_url("bus.jsp",
"URL=http://10.5.185.15:7001/xx/bus.jsp",
"TargetFrame=",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);
web_reg_find("Search=Body",
"SaveCount=tmp1",
"Text=订单提交成功",
LAST);
lr_start_transaction("pos");
web_submit_data("submit!pay",
"Action=http://10.5.185.15:7001/xx/mystruts/submit!pay",
"Method=GET",
"EncType=",
"TargetFrame=",
"RecContentType=text/html",
"Referer=http://10.5.185.15:7001/xx/bus.jsp",
"Snapshot=t2.inf",
"Mode=HTML",
ITEMDATA,
"Name=transsource", "Value=006", ENDITEM,
"Name=transdate", "Value=20170312", ENDITEM,
"Name=transtime", "Value=190200", ENDITEM,
"Name=transseq", "Value=20161025124200112", ENDITEM,
"Name=rdseq", "Value={rdseq}", ENDITEM,
"Name=paymentcode", "Value={paymentcode}", ENDITEM,
"Name=qrmode", "Value=1", ENDITEM,
"Name=applyentity", "Value=Z07002", ENDITEM,
"Name=ouramount", "Value=10.01", ENDITEM,
"Name=title", "Value=Test title", ENDITEM,
"Name=paytype", "Value=RT05", ENDITEM,
"Name=cur", "Value=CNY", ENDITEM,
"Name=expiredate", "Value=20161111170000", ENDITEM,
"Name=notify_url", "Value=http://localhost:8080/notify.action", ENDITEM,
"Name=return_url", "Value=http://www.baidu.com", ENDITEM,
"Name=ipaddress", "Value=127.0.0.1", ENDITEM,
"Name=sourcenotecode", "Value=BD20140400000000000020", ENDITEM,
"Name=insurer", "Value=Test name", ENDITEM,
"Name=insured", "Value=Test me", ENDITEM,
"Name=purpose", "Value=test purpose", ENDITEM,
"Name=memo", "Value=test Memo", ENDITEM,
"Name=coupon", "Value=00001", ENDITEM,
"Name=salechannel", "Value=test SaleChannel", ENDITEM,
"Name=insurancetype", "Value=test InsuranceType", ENDITEM,
"Name=Sign", "Value={Sign}", ENDITEM,
EXTRARES,
LAST);
/* Request with GET method to URL "http://10.10.140.207:7001/favicon.ico" failed during recording. Server response : 404*/
if(atoi(lr_eval_string("{tmp1}"))>0) {
lr_end_transaction("pos", LR_PASS);
}
else
{
lr_end_transaction("pos", LR_FAIL);
}
return 0;
}
有谁知道? 用这个试下看,参数根据实际调整下 web_set_max_html_param_len("204800");
页:
[1]