Memory goes up when script runs

Results 1 to 2 of 2

Thread: Memory goes up when script runs

  1. #1
    Join Date
    Dec 1969

    Default Memory goes up when script runs

    I have a large script that runs for two - three minutes while it does its processing on an SQL DB.<BR><BR>When its finished the CPU of the server return to normal but the committed bytes of memory stays where it is (about 2 meg higher than it was before the script ran)<BR><BR>I have .close and =nothing all my recordsets and connection objects. any emails and fso objects are =nothing after them. <BR><BR>What could bed causing this memory usage? How can i recover this memory?

  2. #2
    Join Date
    Dec 1969

    Default RE: Memory goes up when script runs

    Sounds like a situation where ASP is not the best tool. My personal rule of thumb is that if it takes more than 10 seconds to run, see if there are other ways. Most ASP pages should (in my view) run in under a second. There are exceptions, of course, but it&#039;s a good rule of thumb.<BR><BR>Two to three minutes sounds like something that you should actively discourage. In these circumstances, I usually use ASP to update a database to set a flag - "run this script". A scheduled task then checks that database every 10 minutes or so and, if the flag is set, runs.<BR><BR>If it takes this long, why not stick it in a VBS file and execute it? Or a VB app? Or something similar. Why do it in ASP?<BR><BR>ASP execution&#039;s handled inside IIS. IIS, I believe, caches compiled ASP scripts. It also attempts to pool connections. There are a number of reasons why IIS may not completely release the memory that your script took.<BR><BR>But if it&#039;s running outside of IIS, when the program terminates, you shouldn&#039;t end up with any issues.<BR><BR>Well, that&#039;s the theory.<BR><BR>:-)<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts