Saturday, March 24, 2012

w3wp.exe 100% CPU

Justin Gengo,

Actually I am not sure whether my revised code caused the infinite loop or
not. Can you take a look? This is the portion of code that I added to my
script and then my browser stopped responding.

sql = "select * from VisitorCount a where ID='"&Request.Form("ID")&"'"
set DataRec=DataConn.Execute(sql)
if not DataRec.eof then
Set objRecordset = Server.CreateObject("ADODB.Recordset")
objRecordset.Open "MessageLog", DataConn, adOpenStatic, adLockOptimistic
application.Lock()
objRecordset.AddNew
objRecordset.Fields("Subject") = DataRec("Subject")
objRecordset.Fields("Message") = DataRec("Message")
objRecordset2.Fields("UpdatedDate") = now
objRecordset.Update
application.UnLock()
objRecordset.close
end if
DataRec.close

Also, besides infinite loop, is there any common reason to cause w3wp.exe
process spikes 100% of CPU?

Thanks!!
Jacky

S. Justin Gengo wrote:
>Jacky,
>It all depends on the problem causing the spike. There are so many things
>that can happen it's possible that what the other person is seeing could
>happen, but be completely unrelated. In your case, if you really have
>written an endless loop then the browser timing out won't help a bit.
>> Thanks for the quick response! I will try it out~
>>
>[quoted text clipped - 30 lines]
>>>>
>>>> Please help me on this! Thanks alot!!!A quick question for you :

Why are you using ADO, instead of using ADO.NET ?
Could your problem be related to that ?

Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================

"Jacky L via DotNetMonster.com" <forum@.DotNetMonster.com> wrote in message
news:53F734D1BD38A@.DotNetMonster.com...
> Justin Gengo,
> Actually I am not sure whether my revised code caused the infinite loop or
> not. Can you take a look? This is the portion of code that I added to my
> script and then my browser stopped responding.
> sql = "select * from VisitorCount a where ID='"&Request.Form("ID")&"'"
> set DataRec=DataConn.Execute(sql)
> if not DataRec.eof then
> Set objRecordset = Server.CreateObject("ADODB.Recordset")
> objRecordset.Open "MessageLog", DataConn, adOpenStatic, adLockOptimistic
> application.Lock()
> objRecordset.AddNew
> objRecordset.Fields("Subject") = DataRec("Subject")
> objRecordset.Fields("Message") = DataRec("Message")
> objRecordset2.Fields("UpdatedDate") = now
> objRecordset.Update
> application.UnLock()
> objRecordset.close
> end if
> DataRec.close
> Also, besides infinite loop, is there any common reason to cause w3wp.exe
> process spikes 100% of CPU?
> Thanks!!
> Jacky
>
> S. Justin Gengo wrote:
>>Jacky,
>>
>>It all depends on the problem causing the spike. There are so many things
>>that can happen it's possible that what the other person is seeing could
>>happen, but be completely unrelated. In your case, if you really have
>>written an endless loop then the browser timing out won't help a bit.
>>
>>> Thanks for the quick response! I will try it out~
>>>
>>[quoted text clipped - 30 lines]
>>>>>
>>>>> Please help me on this! Thanks alot!!!
Because my scripts are running ASP instead of ASP.NET. Is that anything
related? Thanks Juan!

Juan T. Llibre wrote:
>A quick question for you :
>Why are you using ADO, instead of using ADO.NET ?
>Could your problem be related to that ?
>Juan T. Llibre
>ASP.NET MVP
>ASP.NET FAQ : http://asp.net.do/faq/
>==========================
>> Justin Gengo,
>>
>[quoted text clipped - 36 lines]
>>>>>>
>>>>>> Please help me on this! Thanks alot!!!

--
Message posted via http://www.dotnetmonster.com
To ask ASP questions, please post at
microsoft.public.inetserver.asp.general

This is the ASP.NET newsgroup.

Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================

"Jacky L via DotNetMonster.com" <forum@.DotNetMonster.com> wrote in message
news:53FA1C711F79A@.DotNetMonster.com...
> Because my scripts are running ASP instead of ASP.NET.
> Is that anything related? Thanks Juan!

> Juan T. Llibre wrote:
>>A quick question for you :
>>
>>Why are you using ADO, instead of using ADO.NET ?
>>Could your problem be related to that ?
>>
>>Juan T. Llibre
>>ASP.NET MVP
>>ASP.NET FAQ : http://asp.net.do/faq/
>>==========================
>>
>>> Justin Gengo,
>>>
>>[quoted text clipped - 36 lines]
>>>>>>>
>>>>>>> Please help me on this! Thanks alot!!!
>
> --
> Message posted via http://www.dotnetmonster.com

0 comments:

Post a Comment