1、数据库锁死:
这两天测试并发修改采购收货时,录制回放正确,运行脚本,集合点3个并发时,却老是出错
如下:
Action.c(30): Error -26612: HTTP Status-Code=500 (Internal Server Error) for http://192.168.100.88:88/Purchase/stockin_action.asp?Oper=Edt
解决过程:按Help提示在浏览器输入原地址,发现提示“请重新登陆系统”。
被此误导,偶以为是Session ID、或Cookie失效,于是尝试找关联,花了N多时间。可是脚本里确实不存在需要关联的地方呀,系统默认关联了。
与程序员沟通,证实此过程不会涉及到Session ID 或Cookie。那为什么?
因为集合点下一站就是修改的提交操作,于是查找web_submit_data-->定位查找Log文档
注意点:怎么找log文件
-->Controller-->Results-->Results Settings 查找本次log文件保存目录-->到该目录下查找log文件夹-->打开
惊喜的发现其中竟然有所有Vuser 的运行log。-->打开Error 查找报错的Vuser-->打开相应的log文件
查找error,然后偶发现了一段让偶热泪盈眶的话:
Action.c(30):
Microsoft OLE DB Provider for ODBC Drivers 错误 '800040
Action.c(30): 05'\n
Action.c(30):
\n
Action.c(30): [Microsoft][ODBC SQL Server Driver][SQL Server]事务(进程 ID 53)
Action.c(30): 与另一个进程已被死锁在 lock 资源上,且该事务已被选作死锁牺牲品。请重新运行该事务。
Action.c(30): \n
Action.c(30):
\n
Action.c(30): /Purchase/stockin_action.asp,行
Action.c(30): 205
Action.c(30): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://192.168.100.88:88/Purchase/stockin_action.asp?Oper=Edt" [MsgId: MERR-26612]
Action.c(30): t=37758ms: Closing connection to 192.168.100.88 after receiving status code 500 [MsgId: MMSG-26000]
Action.c(30): t=37758ms: Closed connection to 192.168.100.88:88 after completing 43 requests [MsgId: MMSG-26000]
Action.c(30): t=37760ms: Request done "http://192.168.100.88:88/Purchase/stockin_action.asp?Oper=Edt" [MsgId: MMSG-26000]
Action.c(30): web_submit_data("stockin_action.asp") highest severity level was "ERROR", 1050 body bytes, 196 header bytes [MsgId: MMSG-26388]
Ending action Action. [MsgId: MMSG-15918]
Ending iteration 1. [MsgId: MMSG-15965]
Ending Vuser... [MsgId: MMSG-15966]
Starting action vuser_end. [MsgId: MMSG-15919]
解决了。。。。。。。
很寒。由此可以看出,查看日志文件是件多么重要的事情啊!!!!!
其实并发死锁本来就是本次的重点,之前是写事务,但没有做整个页面的锁定,只是写在SQL里。程序员说这样容易出现页面错误,
又改成页面锁定,具体怎么锁偶没看懂asp外行。之前事务冲突,偶让他写个标志,定义个数值字段增一,偶就可以直观看出来了。
这次改成页面就删掉这些标志了,于是出错就无处可寻。
这次最大的收获就是知道怎么查找Controller的log文件。以后看到Error就不会被牵着鼻子走了~~~~
-------------------------------------
血的教训~~
再次碰到26612错误,此次偶没认真查看log,又重蹈覆辙。
找了N久,还是没发现问题所在。后来索性又打印出所有log。真理就显示出来了。。
so偷懒不得~~
ction.c(208):
Microsoft OLE DB Provider for SQL Server ???? '80040e31
Action.c(208): '\n
Action.c(208):
\n
Action.c(208): ?????????\n
Action.c(208):
\n
Action.c(208): /net_qq/call_Scan.asp???? 24Action.c(208): t>
Action.c(208): Error -26612: HTTP Status-Code=500 (Internal Server Error) for "http://192.168.30.20/net_qq/call_Scan.asp" [MsgId: MERR-26612]
End auto log messages stack. [MsgId: MMSG-10544]
2、关联参数过长:
问题:
用户越多迭代次数越多使用关联返回的参数对web_set_max_html_param_len长度要求越大?
虚拟80个用户,参数化中有300多个用户列表,持续运行5分钟。
使用关联将web_set_max_html_param_len设置成web_set_max_html_param_len("10000000");
但是还是报下面这个错误:
Action.c(33): Error -26377: No match found for the requested parameter "WCSParam_Diff1". Check whether the requested boundaries exist in the response data. Also, if the data you want to save exceeds 10000000 bytes, use web_set_max_html_param_len to increase the parameter size
解决:
使用函数web_set_max_html_param_len("10000000");
设置值为可使用的长度,将函数放在所有代码的首行;