Computer lazy after error on programming with SQL

  • Sometimes, when I'll test a page I'm programming (via IIS) with ASP that uses SQL Server database records, if the page contains any kind of error (related, I presume, with dealing with SQL commands), my computer (AMD K6-III, with 402 mB of RAM) becomes running so lazily, that the progress bar seems have begun a never-ending walk ...until the time-out comes...

    The problem -- of course -- is the error. Then, I close the said page, but...

    From then on, any page I (try to) open under IIS keeps the same never-ending time...

    And even if I try to open any other kind of page (from Explorer, for instance), the computer also spends some precious (and anxious) time "thinking" about that hamletian doubt: "to open-or-not to open" the demanded page...

    WHAT is the problem, and HOW can I overcome, bypass, eliminate it?

    Thanks a lot, in advance, for your help!

    Dalton

  • This was removed by the editor as SPAM

  • First, I'd look at Task Manager to see what process (if any) is hogging your memory/processor time.

    I assume that IIS is running on the machine in question, and SQL Server is not. If SQL Server is on the machine, look for an infinite loop; that would explain the behavior you mention.

    At a guess, the page or DB query you were running is still trying to process a huge amount of data. If so, task manager should help confirm this.

    Do all apps respond sluggishly, or just IIS and IE? If it's everything, then something at the system level has been terminally confused, and a reboot is almost certainly required.

    As a general rule, for debugging this sort of thing, dump the stored procedure you were executing plus its parameters (or the SQL you were executing) to the page, and comment out the execution step. Then, you can try the SQL in Query Analyzer, and see what happens. You might turn the Execution Plan tab on....

    Hope something in here helps.

    RD Francis


    R David Francis

  • rdfozz

    Site Owners

    Thanks for your kind attention.

    When this "thing" happens, usually all tasks, demanded to IIS, become lazy.

    Besides, I'll try your suggestions -- and thanks you for your help.

    Dalton

  • Agrees with previous poster, limit the query to a smaller record set for starters.

    Remember to defrag, update stats, etc.

  • 5409045121009

    Thanks for your suggestions. I'll be trying them!

    Sincerely yours

    Dalton

  • As an after thought switch IIS logging off, saves cpu cycles.

    If multi disks move tempdb,data and log onto their own different disks.

  • 5409045121009

    Thanks once more.

    What I'm doing -- before launching each page, but only after trying to give more attention in reviewing the texts and commands (of course!!!) -- is, at MMC, right-clicking over my site, disconnecting-and-(re)connecting IIS. Wish it -also-helps!!!

    Dalton

  • Just to let you know - this used to happen to me a lot also - and the problem was an infinite loop in my asp page (ie doing something stupid in a loop like not adding rst.movenext). My only solution was to shut down IIS and start again.

  • Restarting your web server can never hurt with this kind of thing - assuming it's not a production machine! Sounds like IIS is keeping an open thread somewhere, it might also be possible to control it's fail-behavior through config options. Dunno exactly but I can with Apache.

  • When the system is slugish for ALL IIS tasks, is this comment based on running other tasks through the same instance of IE? If you close your IE and re-open a new instance, does the execution improve (until you hit the error again?). If so, then you may very well have an infinite loop on the server side - this is the behavior you will see regardless if you hit the "STOP" button or close the page and re-open it (or another page for that matter). IIS will keep linked to the session, not neccessarily the page...

    One common error I have seen is code that is supposed to step through a recordset, but the movenext(ADO)is missing or the loop condition is never met...

  • I meant to add that in the case of an infinite loop on the server side, closing IE that invoked the page will terminate the session at IIS so that you should not have to stop and restart IIS. Then opening a new instance of IE should return performance...

  • Dear Gurus

    Well, I do think all those (good!) tips can conduct us to a ..."salomonic" idea -- that I'll try (needless to say) just if-and-when that never-ending-loop happens again...:

    - That's to say:

    1º - disconnect IIS;

    2º - close IE;

    3º - (re)open IE; and

    4º - (re)connect IIS.

    It worths a try!, don't You think so?

    Thanks, thanks a lot for your attetion!

    Dalton, Rio

  • One thing you must also make sure of is that you clean up your recordset objects at the end of the page, ie "Set recordset = nothing"...

  • Dear martins

    OK! Sure! Closing the recordset must be in the "pattern"-closing coding! It is in mine!

    Nevertheless, thanks for the advice!

    Dalton

Viewing 15 posts - 1 through 15 (of 20 total)

You must be logged in to reply to this topic. Login to reply