ASP 0147 - 500 Server error

newjack
newjack used Ask the Experts™
on
What I have is this:

A script, which uses a VBScript class to retrieve data from the DB using ADO, and uses these returned recordsets to create XML output (instead of HTML). No other ActiveX objects are used in this script, it's pretty basic.
This script can generate 3 different 'xml files' depending on given querystring parameters.

I've got another script which uses the ServerXMLHTTP object to retrieve that XML and displays it on screen.
This retrieves sequentially the 3 possible results from the first script.

The problem:

The XML generating ASP script sometimes generates an  "ASP 0147 - 500 Server error" (<= taken from IIS logfile).
There are no bugs in my script causing errors since I can call the script without errors when I manually use the exact same URL I've used from the second ASP to retrieve the data with XMLHTTP.
Script error would also indicate a linenumber, which is not the case.

The

Question:

What is causing the ASP 0147 Server error ?
The error message itself is very obscure, since it doesn't specify any possible cause of the error.
In most cases script error either come from VBScript (eg. Syntax error), or OLEDB (invalid SQL statements etc), but in this case I don't have a clue what's causing the problem.

Is there a way to find out what exactly is going wrong?


Extract from IIS log:

172.16.0.76, -, 2/06/2003, 16:51:54, W3SVC1, webserver, 172.16.0.76, 3600647, 250, 179, 500, 0, GET, /foo/bar/prcchkxml.asp, TxtList=ARTICLE&IdtArticle=1586442000&IdtLanguage=NL|-|ASP_0147|500_Server_Error,

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
"There are no bugs in my script" - a bit of a bold statement ;)

First and foremost have you got "Friendly errors" turned off on your browser, your browser may be hiding a useful bit of information from you

Here are a few things that might help:
http://www.iisfaq.com/?View=A543
http://support.microsoft.com/default.aspx?scid=kb;en-us;309051
http://www.microsoft.com/serviceproviders/webhosting/HowTo/P118948.asp

Author

Commented:
LOL,

I know it's quite bold to say my script doesn't have any bugs, but I mean that since I don't get any specific Scripterrors, the problem can't be caused by a mistake I made in my code :)

Friendly error messages is turned off yes, but the problem is I never seem to be getting the error when I manually run the script.
I only get it when it's called from the other script using XMLHTTP, and only now and then.

What I did now to test things further is added a number of Response.AppendLog "Cx" (x=number) statements as checkpoint in the problem-script, to figure out if there is any particular code that makes that script hang on IIS.
I have 5 checkpoints in total.

When I check the logs now I see this when things go as they should:

  200, 0, GET, /foo/bar/prcchkxml.asp, TxtList=PRODLIST&IdtCampaign=998C0C1C2C3C4C5,

When things go wrong I get this:

  500, 0, GET, /intrastore/pricechecker/prcchkxml.asp, TxtList=PRODLIST&IdtCampaign=144|-|ASP_0147|500_Server_Error,

No checkpoints at all here, so there must be something going REALLY wrong there.
Checkpoint Zero (C0) is positioned directly after the first Option Explicit line, before any includes, so since this doesn't even show up in the logfile it looks like no code is executed at all!

I find this quite scary...


Author

Commented:
edit: since I was changing my code while typing the previous reply, I added the C0 checkpoint, so I have 6 checkpoints in total :)
Commented:
This usenet post explains what might be the problem:

http://groups.google.be/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=ECE078D19685D3119E980008C7F9E55DDD9AE2%40CPECMAILE01&rnum=1&prev=/groups%3Fq%3Dasp%2B0147%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3DECE078D19685D3119E980008C7F9E55DDD9AE2%2540CPECMAILE01%26rnum%3D1

--quote--

When ASP is about to execute a request after it pulls it from the queue, it
checks to
see if the connection is still around. If it isn't, then ASP logs the error
in the event log.

The best way to get rid of this error is to improve your server's
performance, along with tuning your ASP pages.  I would recommend reading:

http://msdn.microsoft.com/voices/server03272000.asp

and ensure your web applications follow those guidelines.


-- end quote --

I've seen that performance tuning page before, and use most of the tips,
but one of them was refering to sessionstate for an application, and the posibility of disabling it for a single page.

In this app, I am using the session object, but it's not necessary to use it in the page generating the XML.
After disabling the Sessionstate in the asp script, the problem seems to have stopped, or at least it doesn't occur quite as frequently anymore as it did before.

So it looks like the main problem is server performance, as it's not able to process the multiple requests because of the extra hassle of (probably) creating a new session object at each XMLHTTP call from the other ASP script.

I don't think XMLHTTP uses cookies (allowing IIS to store the session-variables) which probably forces it to create a new session at each call, which does take some take, and which could end up choking the server in the end.

Now, how do I give point to myself? :)
newjack,

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question.

RECOMMENDATION: PAQ/Refund this question. Go to this link (http://www-tcsn.experts-exchange.com/Community_Support/) and request for PAQ/Refund to the moderators.

Please leave any comments here within seven days.

-- PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER! --

Thanks,

madeline448
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial