error 'ASP 0251 : 80004005' Response Buffer Limit Exceeded

Hello Experts,

I have an ASP VBScript webpages that outputs XML. the page in question is currently trying to output upto 10,000 records which include a NVARCHAR(6000) field - the code is below..

The problem I'm having is that when I try to access the page - I just get an error, so when i stick it through FeedValidator i get the following message -

"01.<font face="Arial" size=2>
02.<p>Response object</font> <font face="Arial" size=2>error 'ASP 0251 : 80004005'</font>
03.<p>
04.<font face="Arial" size=2>Response Buffer Limit Exceeded</font>
05.<p>
06.<font face="Arial" size=2>/feeds/am/indeed.asp</font><font face="Arial" size=2>, line 0</font>
07.<p>
08.<font face="Arial" size=2>Execution of the ASP page caused the Response Buffer to exceed its configured limit.
09.</font> "

Is there anything I can do within the ASP code to resolve this?

Many thanks

GTN
<%@LANGUAGE="VBSCRIPT"%><?xml version="1.0" encoding="ISO-8859-1"?>
<% Response.Buffer = true
   Response.ContentType = "text/xml"
   
Function ApplyXMLFormatting(strInput)
  strInput = Replace(strInput,"&", "&amp;")
  strInput = Replace(strInput,"'", "&apos;")
  strInput = Replace(strInput,"""", "&quot;")
  strInput = Replace(strInput, ">", "&gt;")
  strInput = Replace(strInput,"<","&lt;")
  strInput = Replace(strInput,"&amp;#163;","&pound;")

  
  ApplyXMLFormatting = strInput
End Function   
    %>
<!--#include file="../../Connections/recruta2.asp" -->
<!--#include file="../../Connections/removeutfformatting.asp" -->
<%
Dim searchresults
Dim searchresults_cmd
Dim searchresults_numRows

Set searchresults_cmd = Server.CreateObject ("ADODB.Command")
searchresults_cmd.ActiveConnection = MM_recruta2_STRING
searchresults_cmd.CommandText = "SELECT  A.JBAID,    A.JBATitle,    A.JBALocation,    A.JBACategory,    A.JBAPayRate,    A.JBADescription,    A.JBAEmplymentType,  A.JBAFeaturedJob, CONVERT(CHAR(11),A.JBADatePosted,106) AS JBADatePosted,    C.JBCLName,   S.JBSURL,    S.JBSURLShort,    S.JBSRegion   FROM dbo.JBAdvert A    inner join dbo.JBClient C on A.JBAClientID = C.JBCLID   inner join dbo.JBSite S on A.JBASiteID = S.JBSSiteID   WHERE JBSSIteOwnerID  = 2 ORDER BY JBSURL,JBAID DESC" 
searchresults_cmd.Prepared = true

Set searchresults = searchresults_cmd.Execute
searchresults_numRows = 0
%>
<source>
  <publisher></publisher> 
  <publisherurl></publisherurl> 

<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
searchresults_numRows = searchresults_numRows + Repeat1__numRows
%>
<% 
While ((Repeat1__numRows <> 0) AND (NOT searchresults.EOF)) 
%>
<job>
<source><%=(searchresults.Fields.Item("JBSURLShort").Value)%></source>
<title><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBATitle").Value)%> - <%=ApplyXMLFormatting(searchresults.Fields.Item("JBAPayRate").Value)%> - <%=ApplyXMLFormatting(searchresults.Fields.Item("JBALocation").Value)%>]]></title>
<date><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBADatePosted").Value)%>]]></date>
<referencenumber><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBAID").Value)%>]]></referencenumber>
<url><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBSURL").Value)%>/detail~ID~<%=(searchresults.Fields.Item("JBAID").Value)%>~<%=Server.URLEncode(searchresults.Fields.Item("JBACategory").Value)%>-jobs-<%=Server.URLEncode(removeutfcharacters(searchresults.Fields.Item("JBATitle").Value))%>-jobs-in-<%=Server.URLEncode(searchresults.Fields.Item("JBALocation").Value)%>-<%=Server.URLEncode(searchresults.Fields.Item("JBCLName").Value)%>-jobs-in-<%=ApplyXMLFormatting(searchresults.Fields.Item("JBSRegion").Value)%>.htm]]></url>
<company><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBCLName").Value)%>]]></company>
<city><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBALocation").Value)%>]]></city>
<country><![CDATA[UK]]></country>
<description><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBADescription").Value)%>]]></description>
<salary><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBAPayRate").Value)%>]]></salary>
<jobtype><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBAEmplymentType").Value)%>]]></jobtype>
<category><![CDATA[<%=ApplyXMLFormatting(searchresults.Fields.Item("JBACategory").Value)%>]]></category>
<sponsored><![CDATA[<%IF searchresults.Fields.Item("JBAFeaturedJob").Value = "Y" then%>1<%End IF%>]]></sponsored>
</job>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  searchresults.MoveNext()
Wend
%>
</source>
<%
searchresults.Close()
Set searchresults = Nothing
%>

Open in new window

garethtnashAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Om PrakashCommented:
Try aadding following code
 if Repeat1__numRows mod 10 = 0 then
      Response.Flush()
 end if

after following lines:

Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
0
AbarajCommented:
Use the Response.Flush before the 'Wend'. To flesh the data.
check this article for more information
http://support.microsoft.com/kb/925764 
0
garethtnashAuthor Commented:
Just to confirm, like so?
  <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  searchresults.MoveNext()
Wend
%>
<% if Repeat1__numRows mod 10 = 0 then
      Response.Flush()
 end if%>
 
?
Thank you


 
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

Om PrakashCommented:

<% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  if Repeat1__numRows mod 10 = 0 then 
        Response.Flush() 
  end if
  searchresults.MoveNext()
Wend
%>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AbarajCommented:
it should be like this
<%
  Repeat1__index=Repeat1__index+1
 Repeat1__numRows=Repeat1__numRows-1
 searchresults.MoveNext()
if Repeat1__numRows mod 10 = 0 then
      Response.Flush()
 end if
Wend
%>
0
garethtnashAuthor Commented:
Thank you both, just very quickly, I've done this -
  <%
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  searchresults.MoveNext()
   if Repeat1__numRows mod 10 = 0 then
      Response.Flush()
 end if
Wend
%>
but is there a difference between that and  -
<%     Repeat1__index=Repeat1__index+1    Repeat1__numRows=Repeat1__numRows-1    if Repeat1__numRows mod 10 = 0 then           Response.Flush()     end if    searchresults.MoveNext()  Wend  %>
Thank you :-)
0
AbarajCommented:
nothiong difference. In my code, after moving to next record, flush the values. And as per om_prakash_p's code, flush the value and move to next record.
you implement any one.
0
garethtnashAuthor Commented:
Thank you both
0
AbarajCommented:
Hi garethtnash,
Dont try to get the complete code from the experts. Try yourself from my 1st posting with the article. Go through that and try yourself.
Thanks
0
LeroyJamesCommented:
FYI you can change the buffer length. in the IIS Metabase
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.