閱讀938 返回首頁    go 阿裏雲 go 技術社區[雲棲]


使用WAMP進行壓力測試,等到TOMCAT報錯發現問題,基本解決國航OA服務器慢慢死掉的問題

進入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 https://*******:8081/airchina/Services?_action=MAINSCREEN


abs -H "X-Anhe-Account-Username: 00000adsads" -H "X-Anhe-Account-Password: *****" -n 100 -c 1 https://***************:8081/airchina/Services?_action=PENDINGITEMS


abs -H "X-Anhe-Account-Username: 00000assaa" -H "X-Anhe-Account-Password: *****" -n 500 -c 1 "https://*******: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進程就不會一直飆升了。


最後更新:2017-04-02 17:09:28

  上一篇:go Java關鍵字throw和throws
  下一篇:go structs2下的第一個helloworld!