|
这段时间因考虑到公司产品业务能力的提升和业务功能的增加,所以把场景设计得比较复杂.修改好代码后,调试,没有问题之后.开始进行测试啦.可一跑,就报ERROR 10048: (Only one usage of each socket address (protocol/network address/port) is normally permitted. ) for VU 20-1 while establishing connection 17/1.
错误.
开始以为是并发导致的错误产生.所以把该释放的都释放了,把并发代码再一修改,如下:
set flag= 0
set rendezous= 1
clear TEST-WIDE semaphore "Upload_Doc"
Acquire TEST-WIDE Mutex Incr_totalAusers
Set UDLV_totalAusers = UDLV_totalAusers + 1
log "udlv_totalAusers:" ,UDLV_totalAusers
if (UDLV_totalAusers = rendezous) then !设置集合数
Set TEST-WIDE semaphore "Upload_Doc"
set flag = 1
Release TEST-WIDE Mutex Incr_totalAusers
else
Release TEST-WIDE Mutex Incr_totalAusers
Wait 60000 for semaphore "Upload_Doc" , on timeout goto Label1 ! this code never gets executed
Endif
Log "Debug trace"
Label1:
if (flag = 1) then
Log "Finally !!!"
else
Log "timeout !!!"
Endif
再进行测试,还是报上面这个错误.于是查了一下官方的FAQ,发现了问题的所在.详见:
http://portal.opensta.org/module ... laybackAddressInUse
在上面的地址当中,有一个错误需要补充一下,HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/TcpipParameters改成HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters 并且在新增注册表项时,新增三个项分别为:
MaxUserPort 10000
TcpNumConnections fffffe
TcpTimedWaitDelay 1e
然后再修改一下 TestExecuter_web.ini 修改如下:
[FILES]
TraceLevel=500
[SOCKET]
MaxSocketDataBuffersCount=64000
SocketDataBuffersGrowingCount=2000
MaxSSLConcurrentReq=8000
SSLGrowingBuffCount=1000
[TEST]
BrowserParallelism=4
InitialVirtualUserCount=1000
VirtualUserGrowBy=20
[THREAD POOL]
ThreadPoolSize=0
ThreadPoolConcurrentThreads=0
[SOCKET]
Linger=0
ReuseAddr=1
Timeout=3600000
再一运行,成功了,再也没有报这个错误啦.
别高兴太早,当我进行第二轮测试的时候,增加用户数一倍之后,又出现错误啦.错误信息:A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied.于是上网搜索了一些问题所在,根据SQAFORUM.COM的一位网友说,是由于Repository Host通信导致的问题,于是在另外一台机上又安装了一个openSTA,把HOST一连接过来,问题照旧。
根据错误信息,可以看得出是由于创建socket对象原因导致的。
所以在考虑是否是因为创建socket 对象超出了限制导致的呢?
希望研究这方面的朋友知道请联系我。谢谢了。 |
|