Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

whm high memory usage in processes

Posted on 2016-11-07
7
Medium Priority
?
253 Views
Last Modified: 2016-11-09
Hi,
Sometimes my site slows down and when I check the processes I see this high memory process. How can I identify the problem?
Thank you

Pid                           Owner      Priority             CPU %      Memory %
849 (Trace) (Kill)      tr1msite         19                     8.99               55.05      

/usr/local/cpanel/3rdparty/bin/analog +CIMAGEDIR /images/ +CDOMAINSFILE /usr/local/cpanel/3rdparty/share/analog/usdom.tab +CCHARTDIR ./ +CALLCHART ON +CLANGFILE /usr/local/cpanel/3rdparty/share/analog/us.lng +COUTFILE /home/tr1msite/tmp/analog/ssl/tr1.msite.com/11.html +CLOCALCHARTDIR /home/tr1msite/tmp/analog/ssl/tr1.msite.com/ +CCACHEOUTFILE /home/tr1msite/tmp/analog/ssl/tr1.msite.com/cache.out +CCACHEFILE /home/tr1msite/tmp/analog/ssl/tr1.msite.com/cache +CVHOST ON +COSREP ON +CBROWSER ON +CFULLBROWSER ON +CREDIRREF ON +CREFSITE ON +CFAILREF ON +CLOGFORMAT COMBINED +CHOSTNAME tr1.msite.com +CHOSTURL http://tr1.msite.com/ /usr/local/apache/domlogs/tr1.msite.com-ssl_log.bkup
0
Comment
Question by:myyis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 17

Expert Comment

by:Sajid Shaik M
ID: 41876983
logon to IIS (webserver)

on command prompt  type cd %windir%\system32\inetsrv   then enter

then type appcmd list wps
aasa.jpg
0
 
LVL 1

Author Comment

by:myyis
ID: 41876992
Hi,
I have nothing with windows. Everything is linux and apache? Can you explain some more details?
Thank you
0
 
LVL 17

Expert Comment

by:Sajid Shaik M
ID: 41877001
sorry man i thought it's windows environment...
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 111

Expert Comment

by:Ray Paseur
ID: 41877063
Who is your hosting company?

PHP has some memory-related settings and functions.  You may be able to use these to identify memory usage patterns.
http://php.net/manual/en/ini.core.php#ini.memory-limit
http://php.net/manual/en/function.memory-get-usage.php
http://php.net/manual/en/function.memory-get-peak-usage.php

If you're running a back-level version of PHP (Less than PHP 7) you may find that arrays and objects have very high memory requirements.  Unset() can release most of the memory that is consumed by large arrays.  Large arrays can result from SQL queries with SELECT *, or other similar activities that load large files, such as parsing large XML documents.
0
 
LVL 1

Author Comment

by:myyis
ID: 41877099
Hi Ray,
I have a dedicated server and I manage the whm panel.
The problem occurs once or twice a day, the memory goes up and returns back to normal in about 1 min.
I suspect  from some of the queries and php scripts but can not catch the exact part that increases the memory.
I use php 5, I may upgrade it but before that I would prefer to solve the problem before the upgrade since after the upgrade the symptoms may disappear even the problem keeps going on.
Thank you.
0
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 total points
ID: 41877164
Maybe something like this will help.  You can drop a one-line function call into the scripts where you suspect an issue.
https://iconoun.com/demo/temp_myyis.php
<?php // demo/temp_myyis.php
/**
 * https://www.experts-exchange.com/questions/28981425/whm-high-memory-usage-in-processes.html
 */
error_reporting(E_ALL);


// A FUNCTION TO LOG THE MEMORY USAGE
function memory_log($tag = NULL)
{
    $log = ini_get('error_log');
    ini_set('error_log', 'memory_log');
    error_log($tag . ' ' . number_format( memory_get_usage() ) );
    ini_set('error_log', $log);
}


$foo = range(0,15);
memory_log('small');

$bar = range(0,32767);
memory_log('large');


// SHOW THE MEMORY LOG
echo file_get_contents('memory_log');

Open in new window

Outputs something like
[07-Nov-2016 08:28:39 America/Chicago] small 217,176
[07-Nov-2016 08:28:39 America/Chicago] large 4,936,400

Open in new window

0
 
LVL 1

Author Closing Comment

by:myyis
ID: 41878635
I will check thank you
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question