aspnet_wp.exe memory usage keep growing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Clement

    aspnet_wp.exe memory usage keep growing

    hi,
    i have an asp.net site and is using SQL Server 2k. i realize the
    aspnet_wp.exe memory usage keep growing and i will receive an error for the
    pages that call the sql connection. others page with no sql connection is
    fined.
    At the time when i encounter the error, i check the memory usage for

    aspnet_wp.exe = 60000kb
    sqlmangr.exe = 40000kb

    at this time, if i terminated the aspnet_wp.exe from the task manager, my
    asp.net web site will back to normal and this problem will occurs again once
    the memory usage is hit to above the same values i mention above.

    in my asp.net, i have several classes that have its own sqlconnection object
    and at the end of code i always dispose the sqlcommand and sqlconnection
    object and it still doesn't help to resolve the problem.
    from my log record, i can see this problem only arrise when performing the
    sql query like sqlcommand.exec utereader or sqlcommand.exec utenonquery and
    etc.

    Follwing is the spec for the software and hardware running the sql and
    asp.net
    Software Spec
    1. .NetFramework 1.0 with SP2
    2. Win2k Server with SP3
    3. SQL Server 2000 with sp2

    Hardware spec.
    1. P4 Xeon processor
    2. 512MB Ram

    Please help!!!
    Thanks
    from clement


  • Kevin Spencer

    #2
    Re: aspnet_wp.exe memory usage keep growing

    60000KB is 60MB, which is not a lot or memory. ASP.Net uses garbage
    collection to clean up unused memory. The garbage collection assures that
    all unused objects will be removed from memory, but the trade-off is that
    the objects are not removed immediately. There is a period of time during
    which unused objects sit in memory waiting for garbage collection. For this
    reason, a typical ASP.Net app will increase memory usage for a time after
    which it levels off, and can even drop. But at 60MB of memory, you are not
    using a lot of memory by ASP.Net standards.

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer

    Big things are made up of
    lots of Little things.

    "Clement" <bfluy@hotmail. com> wrote in message
    news:uFOnq4HQDH A.2432@TK2MSFTN GP10.phx.gbl...[color=blue]
    > hi,
    > i have an asp.net site and is using SQL Server 2k. i realize the
    > aspnet_wp.exe memory usage keep growing and i will receive an error for[/color]
    the[color=blue]
    > pages that call the sql connection. others page with no sql connection is
    > fined.
    > At the time when i encounter the error, i check the memory usage for
    >
    > aspnet_wp.exe = 60000kb
    > sqlmangr.exe = 40000kb
    >
    > at this time, if i terminated the aspnet_wp.exe from the task manager, my
    > asp.net web site will back to normal and this problem will occurs again[/color]
    once[color=blue]
    > the memory usage is hit to above the same values i mention above.
    >
    > in my asp.net, i have several classes that have its own sqlconnection[/color]
    object[color=blue]
    > and at the end of code i always dispose the sqlcommand and sqlconnection
    > object and it still doesn't help to resolve the problem.
    > from my log record, i can see this problem only arrise when performing the
    > sql query like sqlcommand.exec utereader or sqlcommand.exec utenonquery and
    > etc.
    >
    > Follwing is the spec for the software and hardware running the sql and
    > asp.net
    > Software Spec
    > 1. .NetFramework 1.0 with SP2
    > 2. Win2k Server with SP3
    > 3. SQL Server 2000 with sp2
    >
    > Hardware spec.
    > 1. P4 Xeon processor
    > 2. 512MB Ram
    >
    > Please help!!!
    > Thanks
    > from clement
    >
    >[/color]


    Comment

    • Kairi Zikpin

      #3
      Re: aspnet_wp.exe memory usage keep growing

      check to see if you are running out of db connections.

      are you exlicitly closing the connections to the database? before
      disposing of the objct you need to call sql_connection. close



      Clement wrote:[color=blue]
      > hi,
      > i have an asp.net site and is using SQL Server 2k. i realize the
      > aspnet_wp.exe memory usage keep growing and i will receive an error for the
      > pages that call the sql connection. others page with no sql connection is
      > fined.
      > At the time when i encounter the error, i check the memory usage for
      >
      > aspnet_wp.exe = 60000kb
      > sqlmangr.exe = 40000kb
      >
      > at this time, if i terminated the aspnet_wp.exe from the task manager, my
      > asp.net web site will back to normal and this problem will occurs again once
      > the memory usage is hit to above the same values i mention above.
      >
      > in my asp.net, i have several classes that have its own sqlconnection object
      > and at the end of code i always dispose the sqlcommand and sqlconnection
      > object and it still doesn't help to resolve the problem.
      > from my log record, i can see this problem only arrise when performing the
      > sql query like sqlcommand.exec utereader or sqlcommand.exec utenonquery and
      > etc.
      >
      > Follwing is the spec for the software and hardware running the sql and
      > asp.net
      > Software Spec
      > 1. .NetFramework 1.0 with SP2
      > 2. Win2k Server with SP3
      > 3. SQL Server 2000 with sp2
      >
      > Hardware spec.
      > 1. P4 Xeon processor
      > 2. 512MB Ram
      >
      > Please help!!!
      > Thanks
      > from clement
      >
      >[/color]

      Comment

      • Clement

        #4
        Re: aspnet_wp.exe memory usage keep growing

        firstly, thanks for your immediate reply.
        thats right.
        i had try to configure the machine.config at <processModel>m emoryLimit = 40,
        it still can't help. my asp.net program will hit to "404 page not found" or
        just give me blank page.

        by the way, i had also downloaded the iis5recycle.exe and i configure to run
        the recycle when the momory goes to 50MB and it still not resolved the
        problem.

        appreciate ur help!!!


        "Kevin Spencer" <kevin@SPAMMERS SUCKtakempis.co m> wrote in message
        news:u4ykRpJQDH A.3880@tk2msftn gp13.phx.gbl...[color=blue]
        > 60000KB is 60MB, which is not a lot or memory. ASP.Net uses garbage
        > collection to clean up unused memory. The garbage collection assures that
        > all unused objects will be removed from memory, but the trade-off is that
        > the objects are not removed immediately. There is a period of time during
        > which unused objects sit in memory waiting for garbage collection. For[/color]
        this[color=blue]
        > reason, a typical ASP.Net app will increase memory usage for a time after
        > which it levels off, and can even drop. But at 60MB of memory, you are not
        > using a lot of memory by ASP.Net standards.
        >
        > HTH,
        >
        > Kevin Spencer
        > Microsoft FrontPage MVP
        > Internet Developer
        > http://www.takempis.com
        > Big things are made up of
        > lots of Little things.
        >
        > "Clement" <bfluy@hotmail. com> wrote in message
        > news:uFOnq4HQDH A.2432@TK2MSFTN GP10.phx.gbl...[color=green]
        > > hi,
        > > i have an asp.net site and is using SQL Server 2k. i realize the
        > > aspnet_wp.exe memory usage keep growing and i will receive an error for[/color]
        > the[color=green]
        > > pages that call the sql connection. others page with no sql connection[/color][/color]
        is[color=blue][color=green]
        > > fined.
        > > At the time when i encounter the error, i check the memory usage for
        > >
        > > aspnet_wp.exe = 60000kb
        > > sqlmangr.exe = 40000kb
        > >
        > > at this time, if i terminated the aspnet_wp.exe from the task manager,[/color][/color]
        my[color=blue][color=green]
        > > asp.net web site will back to normal and this problem will occurs again[/color]
        > once[color=green]
        > > the memory usage is hit to above the same values i mention above.
        > >
        > > in my asp.net, i have several classes that have its own sqlconnection[/color]
        > object[color=green]
        > > and at the end of code i always dispose the sqlcommand and sqlconnection
        > > object and it still doesn't help to resolve the problem.
        > > from my log record, i can see this problem only arrise when performing[/color][/color]
        the[color=blue][color=green]
        > > sql query like sqlcommand.exec utereader or sqlcommand.exec utenonquery[/color][/color]
        and[color=blue][color=green]
        > > etc.
        > >
        > > Follwing is the spec for the software and hardware running the sql and
        > > asp.net
        > > Software Spec
        > > 1. .NetFramework 1.0 with SP2
        > > 2. Win2k Server with SP3
        > > 3. SQL Server 2000 with sp2
        > >
        > > Hardware spec.
        > > 1. P4 Xeon processor
        > > 2. 512MB Ram
        > >
        > > Please help!!!
        > > Thanks
        > > from clement
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Clement

          #5
          Re: aspnet_wp.exe memory usage keep growing

          i do conn.close, conn.dispose and conn = nothing after use. by running the
          SQL Profiller, i can see the sql db been called and there is always 1 or 2
          connection pool in used. and the same pool will reused if not timeout.


          "Kairi Zikpin" <zikkai.nospam. @netscape.net> wrote in message
          news:3F0395B2.6 010003@netscape .net...[color=blue]
          > check to see if you are running out of db connections.
          >
          > are you exlicitly closing the connections to the database? before
          > disposing of the objct you need to call sql_connection. close
          >
          >
          >
          > Clement wrote:[color=green]
          > > hi,
          > > i have an asp.net site and is using SQL Server 2k. i realize the
          > > aspnet_wp.exe memory usage keep growing and i will receive an error for[/color][/color]
          the[color=blue][color=green]
          > > pages that call the sql connection. others page with no sql connection[/color][/color]
          is[color=blue][color=green]
          > > fined.
          > > At the time when i encounter the error, i check the memory usage for
          > >
          > > aspnet_wp.exe = 60000kb
          > > sqlmangr.exe = 40000kb
          > >
          > > at this time, if i terminated the aspnet_wp.exe from the task manager,[/color][/color]
          my[color=blue][color=green]
          > > asp.net web site will back to normal and this problem will occurs again[/color][/color]
          once[color=blue][color=green]
          > > the memory usage is hit to above the same values i mention above.
          > >
          > > in my asp.net, i have several classes that have its own sqlconnection[/color][/color]
          object[color=blue][color=green]
          > > and at the end of code i always dispose the sqlcommand and sqlconnection
          > > object and it still doesn't help to resolve the problem.
          > > from my log record, i can see this problem only arrise when performing[/color][/color]
          the[color=blue][color=green]
          > > sql query like sqlcommand.exec utereader or sqlcommand.exec utenonquery[/color][/color]
          and[color=blue][color=green]
          > > etc.
          > >
          > > Follwing is the spec for the software and hardware running the sql and
          > > asp.net
          > > Software Spec
          > > 1. .NetFramework 1.0 with SP2
          > > 2. Win2k Server with SP3
          > > 3. SQL Server 2000 with sp2
          > >
          > > Hardware spec.
          > > 1. P4 Xeon processor
          > > 2. 512MB Ram
          > >
          > > Please help!!!
          > > Thanks
          > > from clement
          > >
          > >[/color]
          >[/color]


          Comment

          • Kevin Spencer

            #6
            Re: aspnet_wp.exe memory usage keep growing

            In .Net it is a waste of time to set an object to Nothing, BTW. That is
            handled by Garbage Collection.

            HTH,

            Kevin Spencer
            Microsoft FrontPage MVP
            Internet Developer

            Big things are made up of
            lots of Little things.

            "Clement" <bfluy@hotmail. com> wrote in message
            news:eo1ta4QQDH A.1752@TK2MSFTN GP12.phx.gbl...[color=blue]
            > i do conn.close, conn.dispose and conn = nothing after use. by running the
            > SQL Profiller, i can see the sql db been called and there is always 1 or 2
            > connection pool in used. and the same pool will reused if not timeout.
            >
            >
            > "Kairi Zikpin" <zikkai.nospam. @netscape.net> wrote in message
            > news:3F0395B2.6 010003@netscape .net...[color=green]
            > > check to see if you are running out of db connections.
            > >
            > > are you exlicitly closing the connections to the database? before
            > > disposing of the objct you need to call sql_connection. close
            > >
            > >
            > >
            > > Clement wrote:[color=darkred]
            > > > hi,
            > > > i have an asp.net site and is using SQL Server 2k. i realize the
            > > > aspnet_wp.exe memory usage keep growing and i will receive an error[/color][/color][/color]
            for[color=blue]
            > the[color=green][color=darkred]
            > > > pages that call the sql connection. others page with no sql connection[/color][/color]
            > is[color=green][color=darkred]
            > > > fined.
            > > > At the time when i encounter the error, i check the memory usage for
            > > >
            > > > aspnet_wp.exe = 60000kb
            > > > sqlmangr.exe = 40000kb
            > > >
            > > > at this time, if i terminated the aspnet_wp.exe from the task manager,[/color][/color]
            > my[color=green][color=darkred]
            > > > asp.net web site will back to normal and this problem will occurs[/color][/color][/color]
            again[color=blue]
            > once[color=green][color=darkred]
            > > > the memory usage is hit to above the same values i mention above.
            > > >
            > > > in my asp.net, i have several classes that have its own sqlconnection[/color][/color]
            > object[color=green][color=darkred]
            > > > and at the end of code i always dispose the sqlcommand and[/color][/color][/color]
            sqlconnection[color=blue][color=green][color=darkred]
            > > > object and it still doesn't help to resolve the problem.
            > > > from my log record, i can see this problem only arrise when performing[/color][/color]
            > the[color=green][color=darkred]
            > > > sql query like sqlcommand.exec utereader or sqlcommand.exec utenonquery[/color][/color]
            > and[color=green][color=darkred]
            > > > etc.
            > > >
            > > > Follwing is the spec for the software and hardware running the sql and
            > > > asp.net
            > > > Software Spec
            > > > 1. .NetFramework 1.0 with SP2
            > > > 2. Win2k Server with SP3
            > > > 3. SQL Server 2000 with sp2
            > > >
            > > > Hardware spec.
            > > > 1. P4 Xeon processor
            > > > 2. 512MB Ram
            > > >
            > > > Please help!!!
            > > > Thanks
            > > > from clement
            > > >
            > > >[/color]
            > >[/color]
            >
            >[/color]


            Comment

            • Clement

              #7
              Re: aspnet_wp.exe memory usage keep growing

              got any idea for work around ?
              i got an crazy idea to restart the IIS every 10 hours. but it is not the
              final soulution.
              any suggestion

              "Kevin Spencer" <kevin@SPAMMERS SUCKtakempis.co m> wrote in message
              news:uF1IOqVQDH A.2320@TK2MSFTN GP12.phx.gbl...[color=blue]
              > In .Net it is a waste of time to set an object to Nothing, BTW. That is
              > handled by Garbage Collection.
              >
              > HTH,
              >
              > Kevin Spencer
              > Microsoft FrontPage MVP
              > Internet Developer
              > http://www.takempis.com
              > Big things are made up of
              > lots of Little things.
              >
              > "Clement" <bfluy@hotmail. com> wrote in message
              > news:eo1ta4QQDH A.1752@TK2MSFTN GP12.phx.gbl...[color=green]
              > > i do conn.close, conn.dispose and conn = nothing after use. by running[/color][/color]
              the[color=blue][color=green]
              > > SQL Profiller, i can see the sql db been called and there is always 1 or[/color][/color]
              2[color=blue][color=green]
              > > connection pool in used. and the same pool will reused if not timeout.
              > >
              > >
              > > "Kairi Zikpin" <zikkai.nospam. @netscape.net> wrote in message
              > > news:3F0395B2.6 010003@netscape .net...[color=darkred]
              > > > check to see if you are running out of db connections.
              > > >
              > > > are you exlicitly closing the connections to the database? before
              > > > disposing of the objct you need to call sql_connection. close
              > > >
              > > >
              > > >
              > > > Clement wrote:
              > > > > hi,
              > > > > i have an asp.net site and is using SQL Server 2k. i realize the
              > > > > aspnet_wp.exe memory usage keep growing and i will receive an error[/color][/color]
              > for[color=green]
              > > the[color=darkred]
              > > > > pages that call the sql connection. others page with no sql[/color][/color][/color]
              connection[color=blue][color=green]
              > > is[color=darkred]
              > > > > fined.
              > > > > At the time when i encounter the error, i check the memory usage for
              > > > >
              > > > > aspnet_wp.exe = 60000kb
              > > > > sqlmangr.exe = 40000kb
              > > > >
              > > > > at this time, if i terminated the aspnet_wp.exe from the task[/color][/color][/color]
              manager,[color=blue][color=green]
              > > my[color=darkred]
              > > > > asp.net web site will back to normal and this problem will occurs[/color][/color]
              > again[color=green]
              > > once[color=darkred]
              > > > > the memory usage is hit to above the same values i mention above.
              > > > >
              > > > > in my asp.net, i have several classes that have its own[/color][/color][/color]
              sqlconnection[color=blue][color=green]
              > > object[color=darkred]
              > > > > and at the end of code i always dispose the sqlcommand and[/color][/color]
              > sqlconnection[color=green][color=darkred]
              > > > > object and it still doesn't help to resolve the problem.
              > > > > from my log record, i can see this problem only arrise when[/color][/color][/color]
              performing[color=blue][color=green]
              > > the[color=darkred]
              > > > > sql query like sqlcommand.exec utereader or[/color][/color][/color]
              sqlcommand.exec utenonquery[color=blue][color=green]
              > > and[color=darkred]
              > > > > etc.
              > > > >
              > > > > Follwing is the spec for the software and hardware running the sql[/color][/color][/color]
              and[color=blue][color=green][color=darkred]
              > > > > asp.net
              > > > > Software Spec
              > > > > 1. .NetFramework 1.0 with SP2
              > > > > 2. Win2k Server with SP3
              > > > > 3. SQL Server 2000 with sp2
              > > > >
              > > > > Hardware spec.
              > > > > 1. P4 Xeon processor
              > > > > 2. 512MB Ram
              > > > >
              > > > > Please help!!!
              > > > > Thanks
              > > > > from clement
              > > > >
              > > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              • Kevin Spencer

                #8
                Re: aspnet_wp.exe memory usage keep growing

                As I mentioned in my previous reply, I don't think you have a problem. 60MB
                is a small footprint for ASP.Net. If your machine can't handle the load, you
                need more RAM. It's cheap!

                HTH,

                Kevin Spencer
                Microsoft FrontPage MVP
                Internet Developer

                Some things just happen.
                Everything else occurs.

                "Clement" <bfluy@hotmail. com> wrote in message
                news:%237SKWRXQ DHA.2212@TK2MSF TNGP12.phx.gbl. ..[color=blue]
                > got any idea for work around ?
                > i got an crazy idea to restart the IIS every 10 hours. but it is not the
                > final soulution.
                > any suggestion
                >
                > "Kevin Spencer" <kevin@SPAMMERS SUCKtakempis.co m> wrote in message
                > news:uF1IOqVQDH A.2320@TK2MSFTN GP12.phx.gbl...[color=green]
                > > In .Net it is a waste of time to set an object to Nothing, BTW. That is
                > > handled by Garbage Collection.
                > >
                > > HTH,
                > >
                > > Kevin Spencer
                > > Microsoft FrontPage MVP
                > > Internet Developer
                > > http://www.takempis.com
                > > Big things are made up of
                > > lots of Little things.
                > >
                > > "Clement" <bfluy@hotmail. com> wrote in message
                > > news:eo1ta4QQDH A.1752@TK2MSFTN GP12.phx.gbl...[color=darkred]
                > > > i do conn.close, conn.dispose and conn = nothing after use. by running[/color][/color]
                > the[color=green][color=darkred]
                > > > SQL Profiller, i can see the sql db been called and there is always 1[/color][/color][/color]
                or[color=blue]
                > 2[color=green][color=darkred]
                > > > connection pool in used. and the same pool will reused if not timeout.
                > > >
                > > >
                > > > "Kairi Zikpin" <zikkai.nospam. @netscape.net> wrote in message
                > > > news:3F0395B2.6 010003@netscape .net...
                > > > > check to see if you are running out of db connections.
                > > > >
                > > > > are you exlicitly closing the connections to the database? before
                > > > > disposing of the objct you need to call sql_connection. close
                > > > >
                > > > >
                > > > >
                > > > > Clement wrote:
                > > > > > hi,
                > > > > > i have an asp.net site and is using SQL Server 2k. i realize the
                > > > > > aspnet_wp.exe memory usage keep growing and i will receive an[/color][/color][/color]
                error[color=blue][color=green]
                > > for[color=darkred]
                > > > the
                > > > > > pages that call the sql connection. others page with no sql[/color][/color]
                > connection[color=green][color=darkred]
                > > > is
                > > > > > fined.
                > > > > > At the time when i encounter the error, i check the memory usage[/color][/color][/color]
                for[color=blue][color=green][color=darkred]
                > > > > >
                > > > > > aspnet_wp.exe = 60000kb
                > > > > > sqlmangr.exe = 40000kb
                > > > > >
                > > > > > at this time, if i terminated the aspnet_wp.exe from the task[/color][/color]
                > manager,[color=green][color=darkred]
                > > > my
                > > > > > asp.net web site will back to normal and this problem will occurs[/color]
                > > again[color=darkred]
                > > > once
                > > > > > the memory usage is hit to above the same values i mention above.
                > > > > >
                > > > > > in my asp.net, i have several classes that have its own[/color][/color]
                > sqlconnection[color=green][color=darkred]
                > > > object
                > > > > > and at the end of code i always dispose the sqlcommand and[/color]
                > > sqlconnection[color=darkred]
                > > > > > object and it still doesn't help to resolve the problem.
                > > > > > from my log record, i can see this problem only arrise when[/color][/color]
                > performing[color=green][color=darkred]
                > > > the
                > > > > > sql query like sqlcommand.exec utereader or[/color][/color]
                > sqlcommand.exec utenonquery[color=green][color=darkred]
                > > > and
                > > > > > etc.
                > > > > >
                > > > > > Follwing is the spec for the software and hardware running the sql[/color][/color]
                > and[color=green][color=darkred]
                > > > > > asp.net
                > > > > > Software Spec
                > > > > > 1. .NetFramework 1.0 with SP2
                > > > > > 2. Win2k Server with SP3
                > > > > > 3. SQL Server 2000 with sp2
                > > > > >
                > > > > > Hardware spec.
                > > > > > 1. P4 Xeon processor
                > > > > > 2. 512MB Ram
                > > > > >
                > > > > > Please help!!!
                > > > > > Thanks
                > > > > > from clement
                > > > > >
                > > > > >
                > > > >
                > > >
                > > >[/color]
                > >
                > >[/color]
                >
                >[/color]


                Comment

                Working...