By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,784 Members | 3,274 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,784 IT Pros & Developers. It's quick & easy.

underlying connection has closed

P: n/a
I am consuming continously my own web-services on a localhost client with a
rate of perhaps 35 request/response-pairs a minute.
I am using "invoke-id=1", so there is at the same time only one request
pending.
After a runtime of 4 days I get the system.net.exception "The underlying
connection was closed: An unexpected error occured on a send"
Subsequent ws-calls in this state result also in the same exception,
browsing a local hosted html-file results in HTTP-error 504.
After a restart of windows all goes well (for the next 4 days).
I read some knowledgebase articles (826210,...) about this behaviour and
tried the webRequest-properties KeppAlive=false and
ProtocolVersion = HttpVersion.Version10 - but no success.
client, server = Win2003server, sp2; Net 2.0

It's a simple HTTP-Web_service, I don't use HTTPS and WSE, the IIS-settings
are the default.

What is the reason for this problem/bug?
What's a stable solution with no performance drawback for a production
environment?
When does MS solve this bug finally?

--
best regards
friedhelm
Jun 25 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Friedhelm,

From your description, when consuming an ASP.NET standard webservice hosted
in IIS server, the client will periodically get 504(underlying connection
was closed...) error ,correct?

As you said that you'll get the problem after a runtime of 4 days, do you
mean when the problem occur, the webserver will stop responding or it just
break those requests send at that time but continue work well after that
point? For such "underlying connection closed..." issue, it is mostly
caused by something at server-side or intermediate connection(such as proxy
server ....) and the KB article you mentioned (826210) just mentioned one
of the possible cause, it is due to the server-side ASP.NET application's
web.config execution timeout value is not long enough that make the
webrequest timeout(and close the connection). However, for your scenario,
I think we still need to further track down the issue. Here are some
possible problems I can get and the things you can check:

** Since ASP.NET use threadpool threads to process coming requests, when
thread pool threads are exhausted, it will stop processing new requests
and cause problem. Is your webservice method call long run or will it be
blocked by some certain resource?

** It is also possible that some unhandled exception occured at server-side
that cause application restart will make the service unavailable for some
time and you'll also receive error at that time.

Things to check include the server-side eventlog to see whether ASP.NET
process has ever recycled or you can add code to trace whether the
application will restart periodically. In addition, there are some
performance counters for ASP.NET applications(such as Requests timeout/sec
, requests reject/sec, ......), you can lookup those counters and track the
change and trends during the period when the problem will occur.

If there is any further finding, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.


Jun 26 '07 #2

P: n/a
Thanks for your reply friedhelm,

Sorry for the delay reply as I was absent due to some urgent issue previous
days. As for the "execution timeout" it is an ASP.NET runtime setting and
it is only a possible cause of such behavior, but for your scenario, it is
not likely due to this since you didn't always get this problem(but
ocassionally after certain period of time).

So far, I think currently you'e better try getting some further information
from the server application and if possible, english one would be
prefereed. In addition, due to the complexity of troubleshooting on such
issue which may be hard to deal with in newsgroup, if this is an urgent
issue, I suggest you contact CSS for further continous assistance.

http://msdn.microsoft.com/subscripti...t/default.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Jul 2 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.