您的位置:首页 > 运维架构 > Tomcat

使用WAMP进行压力测试,等到TOMCAT报错发现问题,基本解决国航OA服务器慢慢死掉的问题

2012-05-29 15:36 666 查看
进入D盘目录下

D:\wamp\bin\apache\apache2.2.21\bin\

输入命令

abs -H "X-Anhe-Account-Username: 00000dsadasads" -H "X-Anhe-Account-Password: *****" -n 500 -c 1 http://*******:8081/airchina/Services?_action=MAINSCREEN
abs -H "X-Anhe-Account-Username: 00000adsads" -H "X-Anhe-Account-Password: *****" -n 100 -c 1 http://***************:8081/airchina/Services?_action=PENDINGITEMS
abs -H "X-Anhe-Account-Username: 00000assaa" -H "X-Anhe-Account-Password: *****" -n 500 -c 1 "http://*******:8081/airchina/Services?_action=TODOWORK&_activityID=4176269&_announcementType=\%E5\%85\%AC\%E5\%8F\%B8\%E8\%A1\%8C\%E6\%94\%BF\%E5\%8F\%91\%E6\%96\%87company&_bizzType=\%E5\%85\%AC\%E5\%8F\%B8\%E5\%8F\%91\%E6\%96\%87\%E4\%B8\%8B\%E8\%A1\%8C&_bpInstanceID=00-YHAMGVEG-3V5K-CN4S-X9D2-KAURXXF6VXIT&_taskID=5046448"

需要注意这些带%号的要加\注释掉

可以进行压力测试。

连续进行100次,500次压力测试,等等

今天终于解决了国航服务器慢慢死掉的问题,就是代码里需要对客户端进行一些单例模式的修改!

private static DocumentServiceDocumentServiceHttpSoap11EndpointStub _result = null;
private static DocumentServiceDocumentServiceHttpSoap11EndpointStub getService()
throws AxisFault {
ConfigurationContext ctx = ConfigurationContextUtil
.getConfigurationContext();
//DocumentServiceDocumentServiceHttpSoap11EndpointStub result = null;
if (_result == null) {
_result = new DocumentServiceDocumentServiceHttpSoap11EndpointStub(ctx,
ConfigUtil.getInstance().getServiceAddress("DocumentService"));
}
return _result;
}


这样JAVA进程就不会一直飙升了。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐