.net 应用程序中的 Java.net.SocketException 连接重置错误 [英] Java.net.SocketException connection reset error in .net application

查看:30
本文介绍了.net 应用程序中的 Java.net.SocketException 连接重置错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 n 层 (.net) Web 应用程序,其中我们有一个 Web 层 -> 应用层 -> 数据库.

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

一切正常,直到我们进行负载测试(使用 jmeter).当我们模拟 100 个并发用户时,3 -4 分钟后.jmeter 开始记录 SocketException,连接重置.当我们检查应用程序日志(我们记录了应用程序内部的所有异常)和系统事件时,我们什么也找不到.

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.

我们没有对网络层的性能采取任何特殊措施.但是在作为 wcf 应用程序的 App 层上,我们使用了 per-call/multiple concurrency.我们在应用层使用了以下配置:

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">

除此之外,我们的应用层使用率也较高(50-60%).以下是我们 3 个虚拟机的配置(每一层一个)

Web 服务器(数量 = 1) 处理器 Intel Xeon CPU X5675 @3.07 GHz 2.19 GHz

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

应用服务器(数量 = 1)处理器 Intel Xeon CPU X5675 @3.07 GHz 3.07 GHz

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

数据库服务器(数量 =1)处理器 Intel Xeon CPU E7-4830v2 @ 2.20 GHz 2.19 GHz

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

推荐答案

IIS 日志有助于挖掘根本原因.我们发现所有遇到Socket问题的请求都存在网络连接异常.

IIS logs were helpful in digging into the root cause. We found that there were network connection exceptions in all the request where we were facing Socket issues.

这篇关于.net 应用程序中的 Java.net.SocketException 连接重置错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆