SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: Memory problem!

  1. #1
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Memory problem!

    Hi,
    I have a huge web site mixed ASP and ASP.NET and MSSQL. I am using hosting provider who set my site to use no more than sertain amount of memory. Some times the site gives error server down because the server starts to freee up the memory when it reaches the maximum. Please give me some advices how to track the leeking memory. I suppose it's because of some unclosed db connections.

    Regards,
    Tim

  2. #2
    SitePoint Enthusiast
    Join Date
    Oct 2006
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had similar problems. Make sure that you do not have any RSs open that don't need to be. I had to make sure that I had only one RS open at a time and my web application was running smooth on only 512 RAM P3. Of course I had to rewrite a lot of code but if you open one RS (maybe 2) do what you have to do and then .close() it and reuse the same RS instead of creating another on the server then everything should be fine.
    Hope this helps

  3. #3
    SitePoint Wizard siteguru's Avatar
    Join Date
    Oct 2002
    Location
    Scotland
    Posts
    3,609
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Look up the .GetRows method in ASP. Also think about limiting the amount of data being returned from a database query ... e.g. SELECT * shows a very sloppy approach to coding and database usage.
    Ian Anderson
    www.siteguru.co.uk

  4. #4
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes I use 2 RS but I close both. How can I monitor or track the memory usage for a paticular process/site?

  5. #5
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    About the SELECT * - yes I aways write the queries with just the fields I need. So I think it's not the problem

  6. #6
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should also close any objects too if you have set some object like fileSystemObject set it to nothing

    like this:
    if you open:
    set fso = createobject("Scripting.FileSystemObject")

    The close it too:
    set fso = nothing
    NOTELAY.COM - Have a nice noty day
    ETA CONSULTING

  7. #7
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you - I searched fo all "createobject"
    and for all "nothing" and the result is 72:60

    Do you think this is the problem?

  8. #8
    SitePoint Member
    Join Date
    Nov 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I fixed all the createobject but I still have the same problem.
    Do you have some other idea?

    Regards,
    Tihomir


Bookmarks

Posting Permissions

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