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

Entity Framework not Finding Table
Windows Service Communicate WIth UI
How can I prevent screen recording using C#?
Angular $http.post() to C# Web API Controller
Return parameter in controller instead a View
How can I pause the audio source and animation at the same time in unity 3d
When should I use ServiceFabricIntegrationOptions.UseUniqueServiceUrl
Regex match and replace operators in math operation
ASP.NET login web application on intranet against Active Directory Domain
Why is the hub context connection ID inaccessible at runtime in my VERY simple method?
How to prevent the CSharpCodeProvider to output access modifiers
How can I get the value of a radio button when the page is posted with mvc
Console two line output
ThreadAbortException with RazorEngine
c# ef Migration with DbContext - NETCore.App 1.1.0 EntityFrameworkCore 1.1.0
Distance between array of array

Categories

HOME
ckan
locale
azure-eventhub
abc
dynamic
ubuntu-14.04
jshell
rethinkdb
ephesoft
google-my-business-api
core-data
derby
logstash-configuration
react-select
versioning
smooth-scrolling
virtuemart
beacon
legend-properties
gpo
gomobile
dev-c++
tcpdf
aspxgridview
rancher
continuous-fourier
git-submodules
units-of-measurement
osgi-bundle
sphinx4
multilanguage
ibm-bpm
language-detection
loopback
microstrategy
machine-code
incapsula
repeat
stencyl
mapquest
qt-quick
taiga
scrapinghub
encoder
npoco
anonymous-function
google-chrome-storage
stanford-nlp-server
lucee
enet
dynamic-linking
fluent-nhibernate-mapping
jenkins-docker
dmalloc
multi-select
firebase-polymer
angularfire
stdlist
dcast
videoview
dynamics-nav-2013
imageicon
page-flipping
vanilla-forums
consul-template
pdcurses
fileinputstream
copy-on-write
accpac
asp.net-2.0
service-broker
conkeror
touch-typing
teamstudio-unplugged
amzi-prolog
opencobol
nativequery
google-voice
pechkin
objectdatasource
angularjs-select2
backbone-views
uikit-dynamics
proj4
http-compression
windows-scheduler
coinbase-php
cloudmade
reference-manual
pdf-reader
wxperl
scriptmanager
apache-commons-email
virtual-printer
log-shipping
sipdroid
webdb
newspeak
disk-based
weak-typing

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