c#


Underlying Connection Failed after some time


We have a WPF application which communicates through REST API hosted on Production Environment running SQL Server 2012.
WPF application works fine but after some few hours of CRUD operations it keeps throwing Under Lying Connection Close exception. Until I restart the SQL Services I am running SQL Express Edition 2012 also on development environment. But it works fine on development environment.
There are a few reasons this could occurr 1) Server or router has settings that are closing the TCP connection. Like a maximum open time. 2) More often this occurs due to the tables that TCP keeps for retrying packets. TCP breaks messages into 1500 byte datagrams (data portion of packet). TCP sends an ACK for each messages sent. When a packet doesn't get ACK it will get resent usually 3-5 times at around 5 seconds a retry. Packets also can be receive in random order. So the sending side of TCP must keep each packet in a table until an ACK is received. Then remove packet from table. The receiver must have table to reorder packets. Packets are removed from table when all previous packets are received. These tables can get very large and then the operating system will probably close application. Normally what causes this to happen is when the receiving end is running a lot of applications it doesn't ACK a message in 5 seconds. So the Sending end re-sends packets. The resend packets sends more data which adds more processing to the receiver slowing the receiver even more. The best way of checking for issue is to use a sniffer like wireshark or fiddler and see if you see duplicate packet numbers which indicates a retry. You should normally see each packet number twice (once when sent and once when ACK).

Related Links

use DBNull.Value in SYBASE Database with MVC C#
Exception While using cefsharp in asp.net Project
Trying to access buttons inside of a asp.net repeater
Index 30 is either negative or above rows count - Issue with pagination
C# UWP GridView DataTemplate bindings issue
c# - wpf - refresh picture between window switching
How do you handle nested bindings in WPF user controls containing lists?
How do I transform appsettings.json in a .NET Core MVC project?
WPF: Is this behavior intended? PreviewLostKeyboardFocus and LostKeyboardFocus
Azure service bus or just Azure web app when using SignalR
Unable to upload files into Godaddy server
Access locals window variables programatically in visual studio
Send message to specific channel/routing key with Masstransit/RabbitMQ in C#
Is the condition in this property setter valid?
Sorting list of strings using linq with custom sort
Specified path is invalid - Robocopy

Categories

HOME
gulp
swift3
leaflet
network-programming
reference
mifare
jquery-plugins
x509certificate
sms
sugarcrm
angularjs-directive
liquidsoap
handlebars.js
virtualhost
google-api-oauth
sahi
token
captcha
indri
gpo
keystone
webgl-earth
turn.js
serenity-js
klipfolio
opengraph
chartist.js
jira-zephyr
akavache
mongoose-im
gulp-jshint
marionette
large-files
typeclass
checkmarx
sqldependency
pypy
hierarchy
2checkout
akamai
blockly
jql
choco
jcr
odp.net
headphones
ansible-inventory
scip
iterm2
mediastream
blueimp
usernotifications
f#-fake
anonymous-function
opos
flask-socketio
aws-rds
jtextarea
grib
spring-cloud-aws
apache-commons-cli
sqlproj
scriptengine
hoare-logic
jde
jcalendar
calc
skbio
instabug
dynamics-nav-2013
gtkwave
gnu-sort
tvp
event-tracking
adempiere
tokudb
playn
vectordrawable
data-quality-services
backtrace
touch-typing
teamstudio-unplugged
static-files
aiff
uiblureffect
powerpoint-2010
nspopupbutton
twitter-finagle
banana-pi
hotlinking
slimscroll
class-library
friendly-id
nsnumber
kohana-orm
friendly-url
qmainwindow
system.transactions
gpl
beep
github-archive
jmesa
unordered-set
helicontech
visual-leak-detector
jexcelapi
service-layer
chromebug
expander
cross-cutting-concerns

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App