Announcement Announcement Module
Collapse

myhosting.com Forum Guidelines

Welcome to the myhosting.com Forums! The purpose of this forum is to allow you to discuss topics relating to hosting and topics of interest with other myhosting.com Customers. The primary focus should relate to issues not generally included in our Wiki or Control Panel, or information not provided by our Customer Support Team. Some examples include programming and coding support, web site design ideas and SEO practices.

The forum is not meant as a replacement to our Wiki or Customer Support. We highly recommend searching our Wiki before posting on the forum. Also, if you have a question for our Customer Support team, please contact them as you would normally.

We ask that if you have any complaints or questions relating specifically to your account, that you address them to our Customer Support department. Do not post personal account information such as passwords or other sensitive and private information the forum, as this type of information is best kept secret. Also, please be respectful of other users and refrain from defamatory comments or use of coarse language.

We will visit the forum from time to time, and contribute to various topics. We reserve the right to delete any posts which are deemed offensive or against the spirit of the forum. Any spamming or illegal activity will not be tolerated. We also reserve the right to block any user who violates these guidelines.

To get started, we welcome you to sign up at our User Management site. Any account created there will have access to these forums, our Wiki, our Ideas site and commenting permission on our Status Blog.
See more
See less
Memory Usage Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Memory Usage

    I was checking out my VPS memory usage. The worrying issue I am seeing is that it never goes down.

    See this chart for the last 6 days, it keeps going up, up and up. Til when ?

    http://www.mejoresdatos.cl/cpu.jpg

  • #2
    it's a good question, could you provide a bit more detail about which processes are using the memory, what your traffic looks like, what the application does etc?

    Comment


    • #3
      Traffic is about, according to awstats, 5400 per day. I don't have any special process running just IIS

      See below a print screen of my resource monitor

      http://www.mejoresdatos.cl/MemoryUsage2.jpg

      Comment


      • #4
        Presuming your traffic stats are consistent and not growing in a similar fashion to the RAM usage, my recommendation would be to check your IIS application pool settings. It could be that your scripts remain open in memory long after they have been used. You can limit the memory usage per worker process as well as set application pool recycle options. Recycling will clear out the memory at a set interval while memory settings will disallow single processes from using too much. First thing would be to check those settings and see if they're set at all. The defaults are quite liberal.

        If you're having trouble, check out this: How to use the IIS Debug Diagnostics tool to troubleshoot a memory leak in an IIS process

        Comment


        • #5
          I checked the memory usage and found several processes referencing to PHP or MySQL using some memory. I don't use those services, I saw how to disable mySQL but I am not sure if either Plesk or the email server are using them !

          http://www.mejoresdatos.cl/memoryusage3.jpg

          I looked at the IIS settings for the application pool and they are the default settings. I enable "Specific time" and set it at 3AM to make sure one recycle will occur per day.

          You know a funny thing ? I spend the last 45 minutes checking this memory issue on the server and looking at the memory usage graph, it shows a decrease !

          http://www.mejoresdatos.cl/memoryusage6.jpg

          Anyway let's wait and see until tomorrow morning. If memory stays like it is I'll restart my VPS

          Comment


          • #6
            It appears that recyclient the application pool of my application doesn't help much. Restarting the VPS yes does. I did it on Saturday morning. My question: is it possible to schedule a restart of the VPS say every Sunday morning at 4AM ?

            http://www.mejoresdatos.cl/picMemory3.jpg

            Comment


            • #7
              Is the memory increase causing you any particular issues? Perhaps we should deal with those concerns first. In an optimal system, most RAM will be in use but fluctuate at a speed that meets demand adequately.

              While it might be possible to schedule a reboot periodically I would not recommended it as other processes could be running such as backups, services may not come backup so you'd have to check them all and many other potential problems.

              Comment


              • #8
                Actually, the first step if you're using Plesk might be to enable Health Monitor. This will track the memory and CPU demands of the various important components running under Plesk and help identify problems with a 7 day history. On the homepage of Plesk, click "Add or Remove Components" and install the Health Monitor component. After a day or so you should have some decent statistics to work with.

                Comment


                • #9
                  Originally posted by jeremya View Post
                  Is the memory increase causing you any particular issues? Perhaps we should deal with those concerns first. In an optimal system, most RAM will be in use but fluctuate at a speed that meets demand adequately. .
                  Nothing so far but I am worried to see the amount of memory use climbing constantly.

                  As you're saying I am surprised that memory does not fluctuate according to the traffic. For instance it peaked on Monday at around midnight, that could be understandable because our peak hour is between 9PM to 11PM. But it should go down at 5AM when traffic is down to almost nothing. See below pic

                  http://www.mejoresdatos.cl/picVisitors.jpg

                  Originally posted by jeremya View Post
                  Actually, the first step if you're using Plesk might be to enable Health Monitor. This will track the memory and CPU demands of the various important components running under Plesk and help identify problems with a 7 day history.
                  It's already installed, the memory usage graphic are from the health monitor but I couldn't find a way to get details views of where is the memory being used

                  By the way I setup a recycle of the application pool where application is running at 3:20AM. See below how I did it. Is it correct ?

                  http://www.mejoresdatos.cl/picpool.jpg

                  Comment


                  • #10
                    To see if application pool recycle will work, you can test by manually recycling the application pool in question or even restarting IIS completely.

                    About the Health Monitor, I would be looking for the IIS, mySQL and other stats memory usage as in the screenshot here:
                    Attachment

                    This all said, if you suspect there's a memory leak, the best way to troubleshoot is with Perfmon. Otherwise you could look at when those memory jumps occur and see if any processes boot up around the same time. You could try disabling specific websites, restarting the server and see if the RAM continues to rise then try the next one... but at the end of the day, if you have a lot of sites, a lot of services and a ton of things going on you might want to turn to perfmon, but it can be a bit complex to get going.

                    There's an article here that may be of assistance:
                    performance - perfmon counters to check memory leak - Stack Overflow
                    Attached Files

                    Comment


                    • #11
                      This morning I went on the server thru Remote Desktop and stop the application pool used by my application: memory usage didn't flinch I then stopped the IIS and restarted it and there I could see memory usage being affect (see printscreen below)
                      FYI: only one website is running yet on that VPS.

                      At this stage I am starting to wonder if it is really my application causing this memory usage. But boy, this is time consuming !

                      Last night I read this article Troubleshooting native memory leak in an IIS 7.x Application Pool but as I need to restart the server I didn't do anything.
                      I am thinking trying Memprofiler or Ants Memory Profiler. Anybody around who used one of them ?

                      http://www.mejoresdatos.cl/picMemory4.jpg
                      Last edited by Corobori; 2013-08-22, 09:00 AM.

                      Comment


                      • #12
                        Then i would definitely recommend disabling the website temporarily to see if the leak stops. If so, it's likely a problem with the website code itself. There could be some looping call that never completes or problematic SQL calls. I presume the site php based or?

                        Comment


                        • #13
                          Originally posted by jeremya View Post
                          Then i would definitely recommend disabling the website temporarily to see if the leak stops. If so, it's likely a problem with the website code itself. There could be some looping call that never completes or problematic SQL calls. I presume the site php based or?
                          When I stopped the Application Pool the website wasn't working anymore and the memory didn't go down. The memory went down only when I stopped the IIS. It's a .NET application.
                          Today I won't able to do anymore testing, I'll see it on Saturday morning.

                          Comment


                          • #14
                            The fight on this topic is ongoing, even worse I added a database on my SQL last saturday (and some memory to). I reached the point having to hire a system engineer with plenty of Microsoft Certification to look into this for me. Perf mon settings and so on are usefull .... when you know how to use it.

                            http://www.corobori.com/sos/picResourceMonitor.jpg
                            Last edited by Corobori; 2013-08-30, 07:39 AM.

                            Comment


                            • #15
                              SQL Server is certainly using a lot of memory. I believe the default is quite high on SQL server but you can specify limits. See: Server Memory Server Configuration Options. That said, I don't see any Hard Faults which suggests you're not seeping into swap or anything...

                              Comment

                              Working...
                              X