The state server has closed an expired TCP/IP connection. The IP
address of the client is 127.0.0.1. The expired Read operation began at
11/16/2007 14:31:49.
This one has been bothering me for quite some time... there didn't seem
to be any real solutions for this or they didn't seem to apply.
Microsoft discusses this issue in the Knowledge base, but it seems to
only happen under very heavy load, and their resolution didn't fix my
problem.
Finally, I figured it out, and I wanted to pass my knowledge on to the
masses.
The biggest clue was that sometimes it would start throwing these state
server errors in the event log at times when there was almost no
traffic on the website. This seemed to indicate to me that microsofts
KB article was dead wrong since they state that this can occur during
heavy load.
The culprit ended up being a "Memory Leak". (I use quotes because it
was not a leak in the traditional sense... its just that objects that I
thought should be GC'd were not getting GC'd)
If you have this issue, take a look at the memory usage on the box.
Does it seem to only go up and rarely go down... i.e. More is being
used than collected over time. I noticed that it went up rather
consistently throughout the day, and not nearly enough of it seemed to
be freed during a GC.
At about 900 Mb, the garbage collector started doing a Gen 2 every
second. A gen 2 on 900 Mb tends to be very CPU intensive, and would max
out our 4 processors to 100% for about a second. Eventually we had it
set up to recycle the app when it got that high, but that wasn't a real
solution.
Do you have many complicated object graphs that tend to be rather large
that are being stored in InProc session or in the ASP.NET cache? How
about web controls that have custom events which are handled by methods
in other web controls? These two were my biggest problems... for the
web controls, I simply unregistered the event handlers in the unload
event of the control. That helped a ton. In ASP.NET, I've found the
best way to write the pages is to load and release, keep as little as
possible in cache... try to use the ViewState rather than
Session/Cache... And be wary of how complicated your object graphs are
getting. Try re-querying the database forg grid paging, rather than
keeping all of the paged data in memory.
I ended up having to purchase the ANTS profiler to see what wasn't
getting relased in a timely fashion, and that helped quite a bit...
That with the Microsoft Application Test Center tool, I was able to fix
my problem... and NOW (finally!) no more of this state server TCP/IP
connection issue.
I hope that this helps somebody in the future
Josh Norris
Senior Application Developer
Henderson Engineers, Inc 0 1969 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: David Morgan |
last post by:
Hello
In my ASP page I am trying to ascertain whether a randomly generated ID starts with certain characters that are not allowed or has been used before.
When the SQL statement for latter is executed I get:
Microsoft OLE DB Provider for SQL Server error '80040e31'
Timeout expired
|
by: DreJoh |
last post by:
I've read many articles on the subject and the majority of them give the same
solution that's in article 821625 on the MSDN website. I'm using the
following code and when a the client disconnects the child socket remains in
the CLOSE_WAIT state. Anyone have any idea what's missing?
----------------------------- Socket Code -----------------------------
namespace Sockets
{
#region Class - SocketClient
|
by: Claire |
last post by:
I'm trying to debug my network application ie I want to check my error
handling when the connection is broken.
Im using 127.0.0.1 as the connection address.
Unfortunately, the client socket goes into a CLOSE_WAIT state ad infinitum
and never closes fully until my client and server applications shut down.
Ive disabled lingeroptions.
Is there anything else easy that i can do to force the loopback to close
immediately?
|
by: LeyvaOne |
last post by:
Has anyone had an issue wher they receive the "The state server has
closed an expired TCP/IP connection" event log message? We have a
load-balanced server environment running on Windows 2003. The 2 web
servers are using the database server as the state server. This error
has been found on the database server and it seems to be happening
fairly consistently.
|
by: bennett |
last post by:
In the web.config file for my application, in the <sessionState>
section I have set timeout="120" (in minutes), but session state
variables in my application seem to be expiring in about 5 minutes.
Any idea what could cause this?
I have the mode="InProc" attribute set for <sessionState>. I know that
some people have solved the problem of session variables timing out too
quickly by changing that attribute, but I cannot use...
| |
by: Nils Magnus Englund |
last post by:
Hi,
I've made a HttpModule which deals with user authentication. On the first
request in a users session, it fetches data from a SQL Server using the
following code:
using (SqlConnection connection = new
SqlConnection(ConfigurationSettings.AppSettings))
{
|
by: GarDavis |
last post by:
We just installed Windows Server 2003 SP1 and also Framework 2.0 and
now are seeing this message in the event log every minute or so:
The state server has closed an expired TCP/IP connection. The IP
address of the client is 127.0.0.1. The expired Read operation began at
11/16/2005 14:31:49.
This happened on all four of our web servers. One of the servers
stopped reporting the event this morning for several hours and then
started up...
|
by: dm3281 |
last post by:
Hello --
I'm getting the messages in my state server's event log (web farm) as
displayed on this blog
http://myblog4fun.com/dmohorn/archive/2006/09/28/26.aspx.
I'm being told that other related business units receive these same error
messages and they're telling me its related to Windows 2003 and SP1. They
said if I rollback SP1, these messages will go away. Can anyone confirm or
deny this?
|
by: dm3281 |
last post by:
Hello --
I'm getting the messages in my state server's event log (web farm) as
displayed on this blog
http://myblog4fun.com/dmohorn/archive/2006/09/28/26.aspx.
I'm being told that other related business units receive these same error
messages and they're telling me its related to Windows 2003 and SP1. They
said if I rollback SP1, these messages will go away. Can anyone confirm or
deny this?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |