Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.1k views
in Technique[技术] by (71.8m points)

performance - Java.net.SocketException connection reset error in .net application

We have a n-tier (.net) web application where we have a Web tier -> App tier -> Database.

Everything worked fine until we went for load testing (using jmeter). When we simulated 100 concurrent users, after 3 -4 min. jmeter started logging SocketException, connection reset. When we checked application logs (we logs all the exceptions inside application) and system events, we could not find anything.

We have not taken any special measures for performance on web tier. But on App tier which is a wcf application, we have used per-call/multiple concurrency. We have used following configuration on app tier:

        <serviceThrottling
           maxConcurrentCalls     = "200"
           maxConcurrentSessions  = "200"
           maxConcurrentInstances = "200"/>

. . .

    <binding name="defaultNetTcpBinding" closeTimeout="00:10:00" sendTimeout="00:10:00" receiveTimeout="00:10:00" openTimeout="00:10:00" maxReceivedMessageSize="2147483647" maxBufferPoolSize="2147483647"
             maxConnections="200" listenBacklog="200">

Apart from this issue, our App tier usage is also on higher side (50-60%). Following are the configuration of our 3 VMs (one for each tier)

Web Server (Quantity = 1) Processor Intel Xeon CPU X5675 @3.07 GHz 2.19 GHz

Number of Cores (Virtual)   8

RAM 8GB

Operating System    Windows Sever 2012 Standard

Processor Type  64 Bit

Softwares Installed NET Framework 4.5

App Server (Quantity = 1) Processor Intel Xeon CPU X5675 @3.07 GHz 3.07 GHz

Number of Cores (Virtual)   8

RAM 8GB

Operating System    Windows Sever 2012 Standard

Processor Type  64 Bit

Softwares Installed NET Framework 4.5

DB Server (Quantity =1) Processor Intel Xeon CPU E7-4830v2 @ 2.20 GHz 2.19 GHz

Number of Cores (Virtual)   8

RAM 8GB

Operating System    Windows Sever 2012 Standard

Processor Type  64 Bit

Softwares Installed Microsoft SQL Sever 2014
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If I am performing a distributed testing, should I do the following steps on all my slave systems as well, not to get the "connection reset" error..?

Add the next 2 lines to user.properties file (lives under /bin folder of your JMeter installation):

httpclient4.retrycount=1
hc.parameters.file=hc.parameters

In hc.parameters file (same location - /bin folder of your JMeter installation) add the next line:

http.connection.stalecheck$Boolean=true

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...