IIS Server - Problem with Data Access Deadlock/Timeout

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > December 2005 > Problem with Data Access Deadlock/Timeout





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem with Data Access Deadlock/Timeout
boxboy

2005-11-28, 2:52 am

Hi,

I was/am having a problem with a web hosting company (verio.com) running Windows
Server 2003. The problem is as follows:

The site I am working (http://www.codebot.org) uses active server pages to loaded up
various rss feeds and parse them into pretty response documents. This works great for
server side xml requests when the reuqest is outside of my domain, but when I make a
request within my domain (to the same server), the request for the xml document
timesout or locks the server.

So:

Client Browser requests Page "A"
Page "A" will request Page "B"
Page "B" builds and XML response and return it to Page "A"
Page "A" returns the final response to the Client Browser

You can see the result by visiting http://www.codebot.org "Most Popular Content" area

Here a concise version how Page "A" works:
/rss/test.asp on mydomain

<%@ language="jscript" %>
<%
function getRss(url) {
var xmlRequest = Server.CreateObject("Msxml2.ServerXMLHTTP");
var document = Server.CreateObject("Microsoft.XMLDOM.1.0");
var xml = "";
xmlRequest.open("GET", url, false);
xmlRequest.setRequestHeader("User-Agent",
"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716
Firefox/1.0.6");
xmlRequest.setRequestHeader("Accept", "text/xml");
xmlRequest.send();
document.async = false;
document.load(xmlRequest.responseBody);
xml = document.xml;
xmlRequest = null;
document = null;
return xml;
}

Response.ContentType = "text/xml";
Response.Write(getRss("http://mydomain/rss/list.asp"));
%>

And Page "B":
/rss/list.asp on mydomain

<%@ language="jscript" %>
<%
var connection = Server.CreateObject("ADODB.Connection");
connection.Open("DSN=blah");
var recordset = Server.CreateObject("ADODB.Recordset");
recordset.ActiveConnection = connection;
recordset.Source = "select '<doc>Hello World</doc>' as [result]";
recordset.Open();
Response.Write(recordset.Fields("result").Value);
recordset.Close();
recordset = null;
connection.Close();
connection = null;
%>

Obviously there is more to the pages than above, but these scripts duplicate the
problem.

I have tracked down the exact line where everything locks up. It's where I attempt to
open the recordset in Page "B". Just so you know, the DSN maps to an Access mdb file.

If I load Page "B" from the browser it works fine, but there is something about my
web host's configuration that causes the call to recordset.Open to lock the server
when called from Page "A".

On my home server I do not have this issue, so believe it has something to to with my
web host's configuration.

Could anyone please tell me why the second request fails when opening the recordset?

FWIW: I am able to get around the issue by writing Page "B" as an asp.net page.


Pat [MSFT]

2005-11-28, 6:04 pm

Could be lots of things. The page will block b/c each (concurrent) ASP page
is one thread. When you make a method call, the thread blocks until the
method returns. So, if you are hanging, it is most likely that the method
is not returning.

Could be network configuration, permissions, error on the server, etc.


pat

"boxboy" <a@a.a> wrote in message
news:%23nCl5p%238FHA.2576@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I was/am having a problem with a web hosting company (verio.com) running
> Windows Server 2003. The problem is as follows:
>
> The site I am working (http://www.codebot.org) uses active server pages to
> loaded up various rss feeds and parse them into pretty response documents.
> This works great for server side xml requests when the reuqest is outside
> of my domain, but when I make a request within my domain (to the same
> server), the request for the xml document timesout or locks the server.
>
> So:
>
> Client Browser requests Page "A"
> Page "A" will request Page "B"
> Page "B" builds and XML response and return it to Page "A"
> Page "A" returns the final response to the Client Browser
>
> You can see the result by visiting http://www.codebot.org "Most Popular
> Content" area
>
> Here a concise version how Page "A" works:
> /rss/test.asp on mydomain
>
> <%@ language="jscript" %>
> <%
> function getRss(url) {
> var xmlRequest = Server.CreateObject("Msxml2.ServerXMLHTTP");
> var document = Server.CreateObject("Microsoft.XMLDOM.1.0");
> var xml = "";
> xmlRequest.open("GET", url, false);
> xmlRequest.setRequestHeader("User-Agent",
> "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10)
> Gecko/20050716 Firefox/1.0.6");
> xmlRequest.setRequestHeader("Accept", "text/xml");
> xmlRequest.send();
> document.async = false;
> document.load(xmlRequest.responseBody);
> xml = document.xml;
> xmlRequest = null;
> document = null;
> return xml;
> }
>
> Response.ContentType = "text/xml";
> Response.Write(getRss("http://mydomain/rss/list.asp"));
> %>
>
> And Page "B":
> /rss/list.asp on mydomain
>
> <%@ language="jscript" %>
> <%
> var connection = Server.CreateObject("ADODB.Connection");
> connection.Open("DSN=blah");
> var recordset = Server.CreateObject("ADODB.Recordset");
> recordset.ActiveConnection = connection;
> recordset.Source = "select '<doc>Hello World</doc>' as [result]";
> recordset.Open();
> Response.Write(recordset.Fields("result").Value);
> recordset.Close();
> recordset = null;
> connection.Close();
> connection = null;
> %>
>
> Obviously there is more to the pages than above, but these scripts
> duplicate the problem.
>
> I have tracked down the exact line where everything locks up. It's where I
> attempt to open the recordset in Page "B". Just so you know, the DSN maps
> to an Access mdb file.
>
> If I load Page "B" from the browser it works fine, but there is something
> about my web host's configuration that causes the call to recordset.Open
> to lock the server when called from Page "A".
>
> On my home server I do not have this issue, so believe it has something to
> to with my web host's configuration.
>
> Could anyone please tell me why the second request fails when opening the
> recordset?
>
> FWIW: I am able to get around the issue by writing Page "B" as an asp.net
> page.
>



boxboy

2005-11-28, 6:04 pm

Yes, it is the recordset.Open method that is not returning. But the thing is, in the
Page "A" request I am not using data access, whereas in Page "B" I am.

The point: Page "B" only blocks when attempting to open a recordset. If I remove the
data access in Page "B" everything works fine.

Is it possible the security context under which Page "B" is running, is different
than a normal request?
How can I invesigate this problem further?

Remember, this problem is occuring on a hosted server where I don't have direct
access to the machine. As I had said, the setup works perfectly on my home server.
The hosted server is one where I can't easily inspect/change the configuration. I am
hoping maybe someone might be familiar with this sort of problem and provide me with
a direct answer I can feed to verio's tech support.

Thanks for responding.

"Pat [MSFT]" <patfilot@online.microsoft.com> wrote in message
news:uYcRw1E9FHA.4008@TK2MSFTNGP10.phx.gbl...
> Could be lots of things. The page will block b/c each (concurrent) ASP page is one
> thread. When you make a method call, the thread blocks until the method returns.
> So, if you are hanging, it is most likely that the method is not returning.
>
> Could be network configuration, permissions, error on the server, etc.
>
>
> pat
>
> "boxboy" <a@a.a> wrote in message news:%23nCl5p%238FHA.2576@TK2MSFTNGP12.phx.gbl...
>
>



boxboy

2005-11-29, 2:50 am

Okay, I found this KB article:

http://support.microsoft.com/defaul...b;en-us;Q316451

Hrmm. That sucks. Now I need to find a workaround.


Pat [MSFT]

2005-11-29, 5:58 pm

That is only a problem if you are making multiple simultaneous calls, which
I don't believe you are.

Pat

"boxboy" <a@a.a> wrote in message
news:uewMvMK9FHA.2264@tk2msftngp13.phx.gbl...
> Okay, I found this KB article:
>
> http://support.microsoft.com/defaul...b;en-us;Q316451
>
> Hrmm. That sucks. Now I need to find a workaround.
>



boxboy

2005-11-30, 7:58 am

Okay, well in the LB article it also states that ...

"If a single recursive request causes IIS to deadlock, the typical cause is that ASP
script debugging is enabled. When debugging is enabled, only one ASP worker thread is
available to process the incoming requests for ASP pages."

So without physical access to the server, is there a way to test if they have
debugging enabled? And if it is enabled, is it a usual practice of web hosting
companies run their server's with debugging enabled?

"Pat [MSFT]" <patfilot@online.microsoft.com> wrote in message
news:uVDvRcR9FHA.3132@TK2MSFTNGP12.phx.gbl...
> That is only a problem if you are making multiple simultaneous calls, which I don't
> believe you are.
>
> Pat
>
> "boxboy" <a@a.a> wrote in message news:uewMvMK9FHA.2264@tk2msftngp13.phx.gbl...
>
>



Pat [MSFT]

2005-11-30, 5:54 pm

It is unlikely that they do since it would cause any ASP error to hang the
site, but if you have management access (i.e. via MMC) you can check the
site settings.

Pat

"boxboy" <a@a.a> wrote in message
news:u2YawCa9FHA.1148@tk2msftngp13.phx.gbl...
> Okay, well in the LB article it also states that ...
>
> "If a single recursive request causes IIS to deadlock, the typical cause
> is that ASP script debugging is enabled. When debugging is enabled, only
> one ASP worker thread is available to process the incoming requests for
> ASP pages."
>
> So without physical access to the server, is there a way to test if they
> have debugging enabled? And if it is enabled, is it a usual practice of
> web hosting companies run their server's with debugging enabled?
>
> "Pat [MSFT]" <patfilot@online.microsoft.com> wrote in message
> news:uVDvRcR9FHA.3132@TK2MSFTNGP12.phx.gbl...
>
>



boxboy

2005-11-30, 5:54 pm

I don't think I have MMC acess, as this is a large web hosting company (verio). And
yes, when I use ServerXMLHTTP to call Page "B" the response timesout, and while the
response is timing out I cannot access the site from any other computer until the
timeout interval has passed.

I am going to call their tech support on this issue, but it takes a REALLY long time
to get through and I want an complete understanding of problem before I talk with
them.

Does this sound like a asp debugging on problem?

"Pat [MSFT]" <patfilot@online.microsoft.com> wrote in message
news:eMzgPwc9FHA.2792@TK2MSFTNGP11.phx.gbl...
> It is unlikely that they do since it would cause any ASP error to hang the site,
> but if you have management access (i.e. via MMC) you can check the site settings.
>
> Pat
>
> "boxboy" <a@a.a> wrote in message news:u2YawCa9FHA.1148@tk2msftngp13.phx.gbl...
>
>



Pat [MSFT]

2005-12-01, 2:49 am

Probably not. Sounds more like a network issue.

Pat


"boxboy" <a@a.a> wrote in message
news:e84MDAe9FHA.1248@TK2MSFTNGP14.phx.gbl...
>I don't think I have MMC acess, as this is a large web hosting company
>(verio). And yes, when I use ServerXMLHTTP to call Page "B" the response
>timesout, and while the response is timing out I cannot access the site
>from any other computer until the timeout interval has passed.
>
> I am going to call their tech support on this issue, but it takes a REALLY
> long time to get through and I want an complete understanding of problem
> before I talk with them.
>
> Does this sound like a asp debugging on problem?
>
> "Pat [MSFT]" <patfilot@online.microsoft.com> wrote in message
> news:eMzgPwc9FHA.2792@TK2MSFTNGP11.phx.gbl...
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com