Forum Moderators: coopster & phranque

Message Too Old, No Replies

need help on script

eating away at cpu usage

         

wayne

8:09 am on Apr 6, 2001 (gmt 0)

10+ Year Member



Hello, here is my problem:
I am doing some SEO work for a casino they have 6 servers with 5 sites each site is on its own sever
they are nt boxes running the advanced modular free script from spiderhunter , the script has beeen converted from perl to vbscript , there are no errors on the script the problem is that they offer d/l software on the site,As
soon as they were loaded and the script was added to our default.asp pages,
all 6 web servers CPU's rocketed upto 100% utilisation and stayed there
until we disabled the script.
any idea how i can correct this problem ???

thanks

Wayne

sugarkane

8:49 am on Apr 6, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wayne, it sounds like a bug was introduced into the script during the conversion from perl to vbscript, and it's somehow going into an infinite loop or something. It's hard to say without more information though.

Have you tested the script on a local machine (ie not online)?

wayne

11:50 am on Apr 6, 2001 (gmt 0)

10+ Year Member



it has been tested , i am awaitng it to be sent back to me then i am going to post the script here to see if anyone can help , maybe on the conversion something didnt go through properly ,

thanks for the reply

wayne

wayne

12:13 pm on Apr 6, 2001 (gmt 0)

10+ Year Member



Sugarkane ,

I just found out some more info :

Each of the six servers are dual processor units .
How they have set it up is as follows :
server 1 has all 5 sites on uit , server 2 has all 5 sites on it , and so on each sever
has all 5 sites loaded on to it , they are doing this for tracking and for log balancing , as soon as i have the script back i will post , does this info help you ????

i appreciate it sugarkane

wayne

sugarkane

12:29 pm on Apr 6, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was sure I'd heard of something like this before, so I had a dig around and found a possible solution. Apparently, there is/was a bug in the IIS 4.0 webserver, where using the ASP Request.BinaryRead method would cause the problem you describe.

If the script is trying to send a download to the browser it's highly like that it would use this method. The solution is to apply NT service pack 6a to your servers

Hope this helps, or am I talking rubbish?

wayne

12:46 pm on Apr 6, 2001 (gmt 0)

10+ Year Member



SugarKane i will find out about the servers
here is the script

<%@ LANGUAGE="VBScript"%>
<%

Dim strIsSpider
strIsSpider = "no"

'This is the absolute path to the file containing the list of spiders.
'**********************************************
SpiderList = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Doorways\IPAD\data.db"

'This is the absolute path to the directory containing the directories for the respective search engines and the human directory
'****************************************************
RootCloakDir = Request.ServerVariables("APPL_PHYSICAL_PATH") & "Doorways\"

Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set fso = Server.CreateObject("Scripting.FileSystemObject")

On Error Resume Next

Set INF = fso.OpenTextFile(SpiderList, ForReading, False)

If Err.Number <> 0 Then
Response.Write "Can't open Spider List " & SpiderList & ": " & Err.Description
End If

On Error GoTo 0
Dim Grok
Grok = Split(INF.ReadAll, vbNewLine)

INF.Close : Set INF = Nothing

For Each I in Grok
'WAYNE
'THIS NEXT LOOP IS UNNECESSARY
'SHOULD ONLY USE dbLine(0) NOT 'FOR EACH Z'
'BUT IF I USE dbLine(0) IT GIVES AN SUBSCRIPT OUT OF RANGE ERROR -SEE ATTACHED FILE Error.htm
dbLine = Split(I, ",")

For Each Z in dbLine

If Z = Request.ServerVariables("REMOTE_ADDR") Then
CloakDir = RootCloakDir & dbLine(2)
strIsSpider = "yes"
End If
Next
Next

Dim CloakFilename

'The IP Address was a match so show the respective doorway page
'**************************************************************
If strIsSpider = "yes" Then

CloakFilename = CloakDir & "\Default.html"

Set FILE = fso.OpenTextFile(CloakFilename, ForReading, False)

'Response.Write File.ReadAll
FILE.Close : Set FILE = Nothing

Else

'THE NORMAL DEFAULT PAGE FOLLOWS

End If
%>

let me know if it looks ok to you

wayne

sugarkane

2:40 pm on Apr 6, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, vbscript is not my strong point (to put it mildly), but this part loooks a bit suspect:

Set FILE = fso.OpenTextFile(CloakFilename, ForReading, False)
'Response.Write File.ReadAll
FILE.Close : Set FILE = Nothing

The response.write is commented out, which means this section doesn't actually do anything. Whether this could result in the problem you describe, I don't know, but it means that recognised spiders won't get served anything at all when they visit...

shay

5:11 pm on Apr 6, 2001 (gmt 0)



Hi I work for wayne

just to clarify a few things

The script was being used for the past month but only for one of thier 5 sites and only for one search engine (google, which had 1 doorway page, this was just a test)

There were no problems at this point. The only things that changed in the past 24 hours is more doorway pages were added for other search engines and the data.db file containing the spiders IP's was increased a lot with the added search engines spiders IP's. As far as I am aware the script has not changed at all.

Since there never was a problem before this, Im leaning towards the problems being related to the size of the data.db file now ... I dont know if I am right or how we would be about fixing this problem, any suggestions??

Thanks
shay

sugarkane

8:42 pm on Apr 7, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Shay,

Is the script Wayne posted exactly the same as the one used? If so, have you tried fixing the commented out Response.Write?

shay

10:39 pm on Apr 7, 2001 (gmt 0)



Hi sugarkane

As far as I know it is, the servers are not here, they are at the clients place of business on the other side of the world lol so its hard for me to get things done. I will definately give your suggestion a try and let you know as soon as I can get ahold of the techs there.

Thanks
shay