Page continuously refreshs

P

PW

One of my ASP's was working fine for a long time. Now it has started
constantly refreshing itself. Everytime I run it I just get the first part
of the page, then it refreshes itself, the rest of the page doesn't get
displatyed, and this goes on continuously.

The main sympton is that the select box thats being populated gets a
different number of rows loaded into it each time. And the last row that
gets loaded is always truncated. Its almost like theres some size
limitation its encountering. I didn't think there was a limit on select
boxes.

The ASP is index.asp, and I have a form that submits it to itself.

Any help is greatly appreciated.

I'm using WinXP Pro SP2, IIS, Access db.

Here's the code segment ...

<form method="GET" action="index.asp">
<input type="submit" value="Ok" style="width:
<%=Session("SystemButtonWidth")%>; height:
<%=Session("SystemButtonheight")%>;">
Q-TAGS SELECTION LIST (red lines indicate notes are attached)
<br>
<SELECT name="lbESCI" size="7"
style="font-size:10;color:BLACK;font-family:ARIAL">
<%
Do While Not rs1.EOF
if len(rs1("NOTES")) > 0 then
myOptionText = " class=red "
else
myOptionText = " class=black "
end if

if mySearchString <> "" then
if rs1("ESCI") = mySearchString then
response.write "<option selected " & myOptionText & ">"
else
response.write "<option " & myOptionText & ">"
end if
elseif rs1("ESCI") = left(myQueryString,6) then
response.write "<option selected " & myOptionText & ">"
else
response.write "<option " & myOptionText & ">"
end if

myOption = rs1("ESCI") & " | " & rs1("ESCN")
response.write myOption
response.write "</option>"
rs1.MoveNext
Loop
%>
</select>
</form>
 
P

PW

The rs1 sql statement is here ...

mySQL = mySQL & "SELECT DISTINCT Qtags.ESCI, Qtags.ESCN, Notes.Notes "
mySQL = mySQL & "FROM QTags LEFT JOIN Notes ON (QTags.ESCI = Notes.ESCI) "
mySQL = mySQL & "ORDER BY Qtags.ESCI "
rs1.open mySQL,myDSN
 
P

PW

Heres some new info I just discovered.

I changed one line of code ...

myOption = rs1("ESCI") & " | " & rs1("ESCN")
to
myOption = rs1("ESCI") & " | " & left(rs1("ESCN"),20)

and it worked for about 10 tries of navigating around, then it went back to
its old behavior.

Sure seems like some kind of limit is being hit.
 
A

Adrienne Boswell

One of my ASP's was working fine for a long time. Now it has started
constantly refreshing itself. Everytime I run it I just get the first
part of the page, then it refreshes itself, the rest of the page
doesn't get displatyed, and this goes on continuously.

The main sympton is that the select box thats being populated gets a
different number of rows loaded into it each time. And the last row
that gets loaded is always truncated. Its almost like theres some
size limitation its encountering. I didn't think there was a limit on
select boxes.

What does the view source say? Does the markup validate? A lot of
times, although it is client side, validating markup will show me a
server side problem.
The ASP is index.asp, and I have a form that submits it to itself.

Any help is greatly appreciated.

I'm using WinXP Pro SP2, IIS, Access db.

Here's the code segment ...

<form method="GET" action="index.asp">
<input type="submit" value="Ok" style="width:
<%=Session("SystemButtonWidth")%>; height:
<%=Session("SystemButtonheight")%>;">

Are you including a unit with that? What is it? 10em, 10px, 10toaters?
You would be better off putting this in an external stylesheet, and
Q-TAGS SELECTION LIST (red lines indicate notes are attached)
<br>
<SELECT name="lbESCI" size="7"
style="font-size:10;color:BLACK;font-family:ARIAL">

10 what? cars? toasters? Again, you are better off putting this in an
external stylesheet, eg:
select {font-size:90%; color:#000; background-color: transparent} will
make ALL select elements the same. Nice eh?

<%
Do While Not rs1.EOF
if len(rs1("NOTES")) > 0 then
myOptionText = " class=red "
else
myOptionText = " class=black "
end if

if mySearchString <> "" then
if rs1("ESCI") = mySearchString then
response.write "<option selected " & myOptionText & ">"
else
response.write "<option " & myOptionText & ">"
end if
elseif rs1("ESCI") = left(myQueryString,6) then
response.write "<option selected " & myOptionText & ">"
else
response.write "<option " & myOptionText & ">"
end if

Character values in attributes must be quoted, eg. class="red"
myOption = rs1("ESCI") & " | " & rs1("ESCN")
response.write myOption
response.write "</option>"
rs1.MoveNext
Loop
%>
</select>
</form>

You would also do better to use getrows() instead of looping through the
recordset.

Do you have a URL to look at?
 
A

Adrienne Boswell

The rs1 sql statement is here ...

mySQL = mySQL & "SELECT DISTINCT Qtags.ESCI, Qtags.ESCN, Notes.Notes "
mySQL = mySQL & "FROM QTags LEFT JOIN Notes ON (QTags.ESCI =
Notes.ESCI) " mySQL = mySQL & "ORDER BY Qtags.ESCI "
rs1.open mySQL,myDSN

What records to you get when you run the query from Access? Why are you
using DSN. Google DSN vs DSNless connections.
 
A

Adrienne Boswell

Heres some new info I just discovered.

I changed one line of code ...

myOption = rs1("ESCI") & " | " & rs1("ESCN")
to
myOption = rs1("ESCI") & " | " & left(rs1("ESCN"),20)

and it worked for about 10 tries of navigating around, then it went
back to its old behavior.

Sure seems like some kind of limit is being hit.

Do you have a URL that exhibits this behavior?
 
P

PW

Adrienne Boswell said:
What does the view source say? Does the markup validate? A lot of
times, although it is client side, validating markup will show me a
server side problem.


Are you including a unit with that? What is it? 10em, 10px, 10toaters?
You would be better off putting this in an external stylesheet, and


10 what? cars? toasters? Again, you are better off putting this in an
external stylesheet, eg:
select {font-size:90%; color:#000; background-color: transparent} will
make ALL select elements the same. Nice eh?



Character values in attributes must be quoted, eg. class="red"


You would also do better to use getrows() instead of looping through the
recordset.

Do you have a URL to look at?

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


Hi Adrienne,

"What does the view source say?" ... brilliant! That was an excellent
suggestion. I did just that and found that the page that was being produced
is in excess of 250k. After reading other blogs on this topic I've come to
the conclusion that IIS may be timing out due to the large page size due to
the excessive number of records I am selecing from the database (over
10,000).

I removed some of the code thats producing formatting and 'voila' it worked,
even with the massive 10,000 rows requested. So it would appear the issue
is simply that IIS can't handle the size of the HTML page being produced and
times out, thus NOT producing the rest of the page, and truncating the
resulting HTML.

This can be reduced by changing my formatting to CSS and reducing the
overall content of the page.

Quite a new technical issue I have never come across before.

Thanks for your help.

Regards,
PW
 
E

Evertjan.

PW wrote on 07 okt 2007 in microsoft.public.inetserver.asp.general:
What does the view source say?" ... brilliant! That was an excellent
suggestion. I did just that and found that the page that was being
produced is in excess of 250k. After reading other blogs on this
topic I've come to the conclusion that IIS may be timing out due to
the large page size due to the excessive number of records I am
selecing from the database (over 10,000).

I removed some of the code thats producing formatting and 'voila' it
worked, even with the massive 10,000 rows requested. So it would
appear the issue is simply that IIS can't handle the size of the HTML
page being produced and times out, thus NOT producing the rest of the
page, and truncating the resulting HTML.

This can be reduced by changing my formatting to CSS and reducing the
overall content of the page.

Quite a new technical issue I have never come across before.

"a new technical issue" ???

If that is the diagnosis always consider a bug in reasoning.
Servers cannot refresh, only clients can [without push technology].
That is why servers are called "servers".

I severely doubt that anything IIS produces and sends to the client will
have the browser refresh, unless it contains either:
1 some sort of refresh header
2 a meta refresh
3 a clientside code refresh

And why would IIS send that if you do not specify?

In the end it must be a clientside issue, not just a IIS timeout issue.

Purely theoretically speaking ...

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

btw, whatever human or humanoid user wil read pages of 10000+ records,
or are you by chance sending bitmaps with 1 record = 1 pixel,
absolutely positioned by CSS?
 
P

PW

Evertjan. said:
"a new technical issue" ???

If that is the diagnosis always consider a bug in reasoning.
Servers cannot refresh, only clients can [without push technology].
That is why servers are called "servers".

I severely doubt that anything IIS produces and sends to the client will
have the browser refresh, unless it contains either:
1 some sort of refresh header
2 a meta refresh
3 a clientside code refresh

And why would IIS send that if you do not specify?

In the end it must be a clientside issue, not just a IIS timeout issue.

Purely theoretically speaking ...

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

btw, whatever human or humanoid user wil read pages of 10000+ records,
or are you by chance sending bitmaps with 1 record = 1 pixel,
absolutely positioned by CSS?


Sorry, when I said it was a new technical issue, I meant it was new to me.
Certainly this issue has been around for a long time, I have simply never
encountered it before.

About the refreshing, the reason the page continually refreshed (I believe)
is because it is index.asp and I have a form within the page that directs it
to itself with different variable values which it reacts too in the
appropriate way.

About the timeout diagnosis, as I mentioned in my earlier post, I have read
other blogs around the internet that indicated that if the resulting html
page is large then IIS seems to timeout. Perhaps thats not what technically
happens, but that appears to be the end result. The resulting html page in
NOT completely 'served' and is truncated. It seems to be timing out, at
least it seems to NOT be finishing the serving of the page.

About the 10,000 records, yes I agree its too much and I will address that
.... but at the moment I am happy that the technical issue I originally
started this thread about is now solved. Whether people agree or disagree
about what the page does is a totally separate discussion.

Does that help you? I hope so.

Regards,
PW
 
A

Anthony Jones

PW said:
Evertjan. said:
"a new technical issue" ???

If that is the diagnosis always consider a bug in reasoning.
Servers cannot refresh, only clients can [without push technology].
That is why servers are called "servers".

I severely doubt that anything IIS produces and sends to the client will
have the browser refresh, unless it contains either:
1 some sort of refresh header
2 a meta refresh
3 a clientside code refresh

And why would IIS send that if you do not specify?

In the end it must be a clientside issue, not just a IIS timeout issue.

Purely theoretically speaking ...

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

btw, whatever human or humanoid user wil read pages of 10000+ records,
or are you by chance sending bitmaps with 1 record = 1 pixel,
absolutely positioned by CSS?


Sorry, when I said it was a new technical issue, I meant it was new to me.
Certainly this issue has been around for a long time, I have simply never
encountered it before.

About the refreshing, the reason the page continually refreshed (I believe)
is because it is index.asp and I have a form within the page that directs it
to itself with different variable values which it reacts too in the
appropriate way.

About the timeout diagnosis, as I mentioned in my earlier post, I have read
other blogs around the internet that indicated that if the resulting html
page is large then IIS seems to timeout. Perhaps thats not what technically
happens, but that appears to be the end result. The resulting html page in
NOT completely 'served' and is truncated. It seems to be timing out, at
least it seems to NOT be finishing the serving of the page.

IIS doesn't timeout but ASP does. It has a script timeout set by default to
30 seconds.
If you have buffering turned off then you can expect to receive an
incomplete HTML content followed by the contents of the asp 500 internal
error page.

Like Evertjan I can't quite see how this server-side behaviour would invoke
the client-side operation of refreshing the content.
 
A

Adrienne Boswell

Hi Adrienne,

"What does the view source say?" ... brilliant! That was an excellent
suggestion. I did just that and found that the page that was being
produced is in excess of 250k. After reading other blogs on this
topic I've come to the conclusion that IIS may be timing out due to
the large page size due to the excessive number of records I am
selecing from the database (over 10,000).

I removed some of the code thats producing formatting and 'voila' it
worked, even with the massive 10,000 rows requested. So it would
appear the issue is simply that IIS can't handle the size of the HTML
page being produced and times out, thus NOT producing the rest of the
page, and truncating the resulting HTML.

This can be reduced by changing my formatting to CSS and reducing the
overall content of the page.

Quite a new technical issue I have never come across before.

Thanks for your help.

Regards,
PW

I'm glad I was able to help - but, as others have said, what about those
10,000 records. This is something you need to address NOW. All that
data could make a browser timeout or even freeze up. Think about people
on dialup, how long it's going to take to download all that information.

Break the information into chunks, for example, classification ->
category -> type -> widgets. You can even put a bread crumb trail to
help users find their way back.

You really need to do some planning to make this as light weight and
accessible as possible. Users are fickle, and if a page doesn't load
fast enough they are on to something else. You also have to consider
usability - is the easy and intuitive for the user? It's annoying
enough having to go on sites that ask for a country, and you have to
scroll through all the countries - and there are nothing near 10,000
countries (even if you count the ones that don't exist, or are
exceptions).
 
P

PW

Adrienne Boswell said:
I'm glad I was able to help - but, as others have said, what about those
10,000 records. This is something you need to address NOW. All that
data could make a browser timeout or even freeze up. Think about people
on dialup, how long it's going to take to download all that information.

Break the information into chunks, for example, classification ->
category -> type -> widgets. You can even put a bread crumb trail to
help users find their way back.

You really need to do some planning to make this as light weight and
accessible as possible. Users are fickle, and if a page doesn't load
fast enough they are on to something else. You also have to consider
usability - is the easy and intuitive for the user? It's annoying
enough having to go on sites that ask for a country, and you have to
scroll through all the countries - and there are nothing near 10,000
countries (even if you count the ones that don't exist, or are
exceptions).

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share


Ahhh, I should have mentioned that this in on an intranet, not the internet.
The application is used by a select few logistics 'catalogers' who are using
the application to categorise supply records. The 'select' box that is
being populated with the 10,000 records is actually very quick (maybe 5
seconds?) probably because its on an internal high speed network and not on
the WWW. Also the 'select' box is being populated with just a 6 character
ID and the first 20 characters of the description, so it really is
adequately fast.

BUT, I take your point and I am going to redo it so the user can perform a
drill-down rather than get stomped with the entire record set. Of course
the result will be an almost instant didplay rather than a sluggish 5-10
seconds delay.

Again, many thanks for your help. I am stoked! :)

Regards,
PW
 
P

PW

Anthony Jones said:
PW said:
Evertjan. said:
"a new technical issue" ???

If that is the diagnosis always consider a bug in reasoning.
Servers cannot refresh, only clients can [without push technology].
That is why servers are called "servers".

I severely doubt that anything IIS produces and sends to the client
will
have the browser refresh, unless it contains either:
1 some sort of refresh header
2 a meta refresh
3 a clientside code refresh

And why would IIS send that if you do not specify?

In the end it must be a clientside issue, not just a IIS timeout issue.

Purely theoretically speaking ...

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

btw, whatever human or humanoid user wil read pages of 10000+ records,
or are you by chance sending bitmaps with 1 record = 1 pixel,
absolutely positioned by CSS?


Sorry, when I said it was a new technical issue, I meant it was new to
me.
Certainly this issue has been around for a long time, I have simply never
encountered it before.

About the refreshing, the reason the page continually refreshed (I believe)
is because it is index.asp and I have a form within the page that directs it
to itself with different variable values which it reacts too in the
appropriate way.

About the timeout diagnosis, as I mentioned in my earlier post, I have read
other blogs around the internet that indicated that if the resulting html
page is large then IIS seems to timeout. Perhaps thats not what technically
happens, but that appears to be the end result. The resulting html page in
NOT completely 'served' and is truncated. It seems to be timing out, at
least it seems to NOT be finishing the serving of the page.

IIS doesn't timeout but ASP does. It has a script timeout set by default
to
30 seconds.
If you have buffering turned off then you can expect to receive an
incomplete HTML content followed by the contents of the asp 500 internal
error page.

Like Evertjan I can't quite see how this server-side behaviour would
invoke
the client-side operation of refreshing the content.


Ahhh, ok more info that I didn't know. I will read up on the buffering and
timeout settings and try tuning them to see what the result is.

many thanks,
PW
 
P

PW

PW said:
Anthony Jones said:
PW said:
"a new technical issue" ???

If that is the diagnosis always consider a bug in reasoning.
Servers cannot refresh, only clients can [without push technology].
That is why servers are called "servers".

I severely doubt that anything IIS produces and sends to the client
will
have the browser refresh, unless it contains either:
1 some sort of refresh header
2 a meta refresh
3 a clientside code refresh

And why would IIS send that if you do not specify?

In the end it must be a clientside issue, not just a IIS timeout
issue.

Purely theoretically speaking ...

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

btw, whatever human or humanoid user wil read pages of 10000+ records,
or are you by chance sending bitmaps with 1 record = 1 pixel,
absolutely positioned by CSS?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


Sorry, when I said it was a new technical issue, I meant it was new to
me.
Certainly this issue has been around for a long time, I have simply
never
encountered it before.

About the refreshing, the reason the page continually refreshed (I believe)
is because it is index.asp and I have a form within the page that
directs it
to itself with different variable values which it reacts too in the
appropriate way.

About the timeout diagnosis, as I mentioned in my earlier post, I have read
other blogs around the internet that indicated that if the resulting
html
page is large then IIS seems to timeout. Perhaps thats not what technically
happens, but that appears to be the end result. The resulting html page in
NOT completely 'served' and is truncated. It seems to be timing out, at
least it seems to NOT be finishing the serving of the page.

IIS doesn't timeout but ASP does. It has a script timeout set by default
to
30 seconds.
If you have buffering turned off then you can expect to receive an
incomplete HTML content followed by the contents of the asp 500 internal
error page.

Like Evertjan I can't quite see how this server-side behaviour would
invoke
the client-side operation of refreshing the content.


Ahhh, ok more info that I didn't know. I will read up on the buffering
and timeout settings and try tuning them to see what the result is.

many thanks,
PW


Ok, I read about response.buffer (thanks W3 schools!) and set it to true,
then placed a response.flush within the loop that was causing my issue. And
it works perfectly. I even removed the description truncation and used the
full description, and it also works perfectly. So, my original conclusion
(IIS timing out) was incorrect, its actually the buffering.

Once again, thanks for all your help. This newsgroup is such a valuable
resource.

Regards,
PW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top