469,902 Members | 1,799 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,902 developers. It's quick & easy.

ASP.NET pages occasionally time out

We have a Windows 2000 web server (all patches up to date) that runs a
variety of sites, most of which are straight HTML or ASP.

We have recently added a couple of new ASP.NET sites that use ADO.NET to
connect to (different) SQL databases on another server. A couple of times a
week, these new ASP.NET sites suddenly become unavailable (the client
browser times out with no error message).

Its not even the entire site, either. The welcome page is pure html and
never has a problem, but as soon as I click on the login button (which is an
ASPX), it times out.

Like I said, it happens a couple of times a week. Rebooting the web server
seems to fix the problem, but there has to be an explanation for what is
going on.

Any ideas you might have or directions I should start looking in would be
greatly appreciated.
Thanks!

BradC
Nov 18 '05 #1
4 1235
Any ideas you might have or directions I should start looking in would be
greatly appreciated.


We had a similiar problem...I don't remember the exact symptom, but we had
to reboot every two weeks or so. It turned out that there were a few SQL
calls that weren't being closed, so, overtime, it was just running out of
memory. We fixed those and it's been fine since.

-Darrel
Nov 18 '05 #2
Brad,

Using adplus to get a hang dump when it's happening would be the best bet.
Here's an article:

http://msdn.microsoft.com/library/de...us/dnbda/html/
DBGch03.asp

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
| From: "BradC" <br********@yahoo.com>
| Subject: ASP.NET pages occasionally time out
| Date: Thu, 11 Nov 2004 10:09:21 -0600
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <#Q*************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: host195.nordyne.com 65.245.164.195
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12
phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275354
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| We have a Windows 2000 web server (all patches up to date) that runs a
| variety of sites, most of which are straight HTML or ASP.
|
| We have recently added a couple of new ASP.NET sites that use ADO.NET to
| connect to (different) SQL databases on another server. A couple of times
a
| week, these new ASP.NET sites suddenly become unavailable (the client
| browser times out with no error message).
|
| Its not even the entire site, either. The welcome page is pure html and
| never has a problem, but as soon as I click on the login button (which is
an
| ASPX), it times out.
|
| Like I said, it happens a couple of times a week. Rebooting the web
server
| seems to fix the problem, but there has to be an explanation for what is
| going on.
|
| Any ideas you might have or directions I should start looking in would be
| greatly appreciated.
| Thanks!
|
| BradC
|
|
|

Nov 18 '05 #3
Thanks, Jim and Darrel.
Here's an update.

One of the two ASP.NET sites is a pretty straight-forward site that uses a
database to store the page content separate from the layout and style, and
allow customers to pull up information on several different services.

The OTHER web app, however, is a web app designed to query a very LARGE
database and return query results either on the page itself, or by means of
a downloadable XLS file.

Turns out I didn't have anything in the second application preventing users
from trying to run a query on the entire recordset (over 280,000 records).
Any query that would have returned results of about 35,000 or over was
locking up the aspnet_wp.exe process, and the client page was timing out
before any results were returned.

Rebooting fixed the problem because it killed the aspnet_wp.exe process.
I fixed it temporarily by hard-coding a limit of 32,000 into the query
results, which processes and returns a page in a little over 2 minutes.

SO, my next problem: (several problems, actually)
1) How do I keep big giant queries in one ASP.NET app from affecting the
performance of my other applications?
2) How can I show users running queries a "query in progress" page while
data is being retrieved? Any easy way to actually put a progress bar on it?
3) Is there any way to ALLOW retrieval of very large data sets without the
client timing out? My client says that he would like to push the limit up to
at least 65,000.
4) Are there better ways of retrieving large datasets than how I'm doing it?
(I'm giving the user a choice--display the results in an on-page table with
optional paging, or download as XLS. To download as XLS, I'm taking the
results of the table html, pushing it into a datastream, and rebadging it as
XLS. Excel is smart enough to open it up correctly even thought its really
only a HTML file with a giant table inside.)

I know that these are not simple questions, but any ideas you might have
would be greatly appreciated.

BradC

"Darrel" <no*****@nospam.com> wrote in message
news:OS**************@TK2MSFTNGP15.phx.gbl...
Any ideas you might have or directions I should start looking in would be
greatly appreciated.


We had a similiar problem...I don't remember the exact symptom, but we had
to reboot every two weeks or so. It turned out that there were a few SQL
calls that weren't being closed, so, overtime, it was just running out of
memory. We fixed those and it's been fine since.

-Darrel

Nov 18 '05 #4
Hi Brad,

1. On Windows 2000, you can't. All ASP.NET applications run under the
aspnet_wp.exe process. The quick answer to your question is to move to
Windows Server 2003.

2. You'll need to spin up a new thread to handle the query. You can use
an async call to do it which essentially does the same thing. The
Framework documentation contains examples, etc.

3. You will need to set Server.ScriptTimeout to a larger value. You will
also need to make sure that debug is set to false in the <compilation>
element in your configuration file. Additionally, you will want to
probably increase the responseDeadlockInterval in the machine.config file
so that it doesn't cycle the process after 3 minutes.

4. Impossible to answer with any degree of certainty without a code
review. One generic comment I'll make is that many developers do not make
correct use of caching to alleviate problems in this area. Here is a good
article for review:

http://msdn.microsoft.com/library/de...us/dnaspp/html
/aspnet-cachingtechniquesbestpract.asp?frame=true

Jim Cheshire [MSFT]
MCP+I, MCSE, MCSD, MCDBA
ASP.NET Developer Support
ja******@online.microsoft.com

This post is provided "AS-IS" with no warranties and confers no rights.
--------------------
| From: "BradC" <br********@yahoo.com>
| References: <#Q*************@TK2MSFTNGP12.phx.gbl>
<OS**************@TK2MSFTNGP15.phx.gbl>
| Subject: Re: ASP.NET pages occasionally time out
| Date: Fri, 12 Nov 2004 08:43:55 -0600
| Lines: 56
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Response
| Message-ID: <O8**************@TK2MSFTNGP09.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: host195.nordyne.com 65.245.164.195
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP09
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl microsoft.public.dotnet.framework.aspnet:275591
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thanks, Jim and Darrel.
| Here's an update.
|
| One of the two ASP.NET sites is a pretty straight-forward site that uses
a
| database to store the page content separate from the layout and style,
and
| allow customers to pull up information on several different services.
|
| The OTHER web app, however, is a web app designed to query a very LARGE
| database and return query results either on the page itself, or by means
of
| a downloadable XLS file.
|
| Turns out I didn't have anything in the second application preventing
users
| from trying to run a query on the entire recordset (over 280,000
records).
| Any query that would have returned results of about 35,000 or over was
| locking up the aspnet_wp.exe process, and the client page was timing out
| before any results were returned.
|
| Rebooting fixed the problem because it killed the aspnet_wp.exe process.
| I fixed it temporarily by hard-coding a limit of 32,000 into the query
| results, which processes and returns a page in a little over 2 minutes.
|
| SO, my next problem: (several problems, actually)
| 1) How do I keep big giant queries in one ASP.NET app from affecting the
| performance of my other applications?
| 2) How can I show users running queries a "query in progress" page while
| data is being retrieved? Any easy way to actually put a progress bar on
it?
| 3) Is there any way to ALLOW retrieval of very large data sets without
the
| client timing out? My client says that he would like to push the limit up
to
| at least 65,000.
| 4) Are there better ways of retrieving large datasets than how I'm doing
it?
| (I'm giving the user a choice--display the results in an on-page table
with
| optional paging, or download as XLS. To download as XLS, I'm taking the
| results of the table html, pushing it into a datastream, and rebadging it
as
| XLS. Excel is smart enough to open it up correctly even thought its
really
| only a HTML file with a giant table inside.)
|
| I know that these are not simple questions, but any ideas you might have
| would be greatly appreciated.
|
| BradC
|
| "Darrel" <no*****@nospam.com> wrote in message
| news:OS**************@TK2MSFTNGP15.phx.gbl...
| >
| >> Any ideas you might have or directions I should start looking in would
be
| >> greatly appreciated.
| >
| > We had a similiar problem...I don't remember the exact symptom, but we
had
| > to reboot every two weeks or so. It turned out that there were a few
SQL
| > calls that weren't being closed, so, overtime, it was just running out
of
| > memory. We fixed those and it's been fine since.
| >
| > -Darrel
| >
|
|
|

Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

25 posts views Thread by JW | last post: by
30 posts views Thread by Gustaf Liljegren | last post: by
4 posts views Thread by surveyor04 | last post: by
28 posts views Thread by Skeets | last post: by
12 posts views Thread by =?Utf-8?B?cGI=?= | last post: by
68 posts views Thread by zwsdotcom | last post: by
42 posts views Thread by Santander | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.