1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Service - Apache CPU Usage - 200%

Discussion in 'Plesk 11.x for Linux' started by Cogeanu, Jan 18, 2013.

  1. Cogeanu

    Cogeanu New Pleskian

    10
    35%
    Joined:
    Jan 18, 2013
    Messages:
    5
    Likes Received:
    0
    Hi to all,

    I would like to know who/what creates such a load on my dedicated server, I only have one website, Prestashop 1.4.x and I have max 10 visits a day.
    I have attached a print screen from Plesk.

    I understood that there are a lot of connections to the database, but how can I identify who/what is doing that so I can stop it.
    Is there a log of the IPs that accessed the website so I could filter them in that specific time frame.

    Huge thanks in advance
     

    Attached Files:

  2. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,547
    Likes Received:
    1,240
    Location:
    Novosibirsk, Russia
  3. Cogeanu

    Cogeanu New Pleskian

    10
    35%
    Joined:
    Jan 18, 2013
    Messages:
    5
    Likes Received:
    0
    Hi IgorG,

    thank you for your reply, I have checked it, and I have tried the given solution.
    I have waited for another peak of the server and I have generated the report. I can not identify what is wrong and how can I fix it, maybe the community could give me a hint.

    Thank you all in advance
     

    Attached Files:

    Last edited: Mar 4, 2013
  4. Faris Raouf

    Faris Raouf Silver Pleskian Plesk Guru

    31
    30%
    Joined:
    Mar 15, 2009
    Messages:
    667
    Likes Received:
    17
    Can you post the report in text form? Call me cautious, but I don't trust Adobe PDFs from unknown sources.

    They key thing, however, is not to just look at the server status at one particular moment. Keep updating it. Look for things that are using a lot of memory and CPU for long periods of time.
     
  5. Dmitriy S

    Dmitriy S Basic Pleskian

    11
    55%
    Joined:
    Mar 2, 2013
    Messages:
    37
    Likes Received:
    0
    I am sure that the problem is not on the Plesk side.

    Try to watch for established and waiting connections.
    # netstat -anp | grep :80 | grep TIME_WAIT | wc -l
    # netstat -anp |grep :80 | grep ESTABLISHED | wc -l

    Having a lot of connections in ESTABLISHED may be due just a high server load, serving files that take a while, or a large KeepAlive setting.

    Check Apache error and access logs. How many GET requests do you have. Compare it with logs when you did not have high load.

    Show top output.

    Try to remember what changes you did on the server before high load.
     
  6. Cogeanu

    Cogeanu New Pleskian

    10
    35%
    Joined:
    Jan 18, 2013
    Messages:
    5
    Likes Received:
    0
    --------------------
    [root@server ~]# netstat -anp | grep :80 | grep TIME_WAIT | wc -l
    4
    [root@server ~]# netstat -anp |grep :80 | grep ESTABLISHED | wc -l
    8
    [root@server ~]#
    --------------------
    top - 20:56:07 up 6 min, 1 user, load average: 8.36, 4.33, 1.83
    Tasks: 132 total, 15 running, 116 sleeping, 0 stopped, 1 zombie
    Cpu(s): 99.7%us, 0.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.2%si, 0.0%st
    Mem: 3906000k total, 1087224k used, 2818776k free, 31800k buffers
    Swap: 2097136k total, 0k used, 2097136k free, 289828k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1845 apache 20 0 446m 30m 4464 R 14.5 0.8 0:34.05 httpd
    1840 apache 20 0 447m 30m 4356 R 14.2 0.8 0:50.36 httpd
    1841 apache 20 0 451m 33m 4404 R 14.2 0.9 0:42.95 httpd
    1842 apache 20 0 446m 30m 4356 R 14.2 0.8 0:49.22 httpd
    1843 apache 20 0 447m 30m 4356 R 14.2 0.8 0:47.99 httpd
    1844 apache 20 0 449m 33m 4380 R 14.2 0.9 0:40.60 httpd
    1846 apache 20 0 451m 34m 4368 R 14.2 0.9 0:47.80 httpd
    1847 apache 20 0 451m 34m 4368 R 14.2 0.9 0:46.24 httpd
    1854 apache 20 0 449m 31m 5336 R 14.2 0.8 0:40.41 httpd
    1877 apache 20 0 446m 30m 4404 R 14.2 0.8 0:27.98 httpd
    1878 apache 20 0 451m 33m 4360 R 14.2 0.9 0:42.71 httpd
    2474 apache 20 0 447m 30m 4348 R 14.2 0.8 0:10.47 httpd
    2521 apache 20 0 446m 29m 4164 R 14.2 0.8 0:01.46 httpd
    1875 apache 20 0 447m 30m 4364 R 13.9 0.8 0:41.71 httpd
    2515 root 20 0 15020 1280 948 R 0.7 0.0 0:00.11 top
    1 root 20 0 19224 1500 1204 S 0.0 0.0 0:00.70 init
    2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
    --------------------

    I can not understand what creates such a load on the server, I only have a single website, with no traffic at this moment.
     

    Attached Files:

  7. Cogeanu

    Cogeanu New Pleskian

    10
    35%
    Joined:
    Jan 18, 2013
    Messages:
    5
    Likes Received:
    0
    [root@server ~]# netstat -anp | grep :80 | grep TIME_WAIT | wc -l
    0
    [root@server ~]# netstat -anp |grep :80 | grep ESTABLISHED | wc -l
    2
    [root@server ~]#
    --------------------------------------
    top - 21:12:39 up 23 min, 1 user, load average: 117.54, 119.74, 73.06
    Tasks: 238 total, 105 running, 133 sleeping, 0 stopped, 0 zombie
    Cpu(s): 97.7%us, 2.2%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.1%si, 0.0%st
    Mem: 3906000k total, 3110564k used, 795436k free, 9940k buffers
    Swap: 2097136k total, 19236k used, 2077900k free, 153208k cached

    PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
    1609 mysql 20 0 1178m 55m 4848 S 3.8 1.5 0:35.88 mysqld
    1842 apache 20 0 447m 29m 4356 R 2.0 0.8 1:19.43 httpd
    1844 apache 20 0 451m 33m 4380 R 2.0 0.9 1:10.19 httpd
    1846 apache 20 0 451m 33m 4376 R 2.0 0.9 1:16.06 httpd
    2308 root 20 0 523m 3032 948 S 2.0 0.1 0:26.45 sw-collectd
    2578 apache 20 0 453m 34m 5320 R 2.0 0.9 0:24.43 httpd
    2585 apache 20 0 451m 33m 4368 R 2.0 0.9 0:20.98 httpd
    2644 apache 20 0 447m 30m 4344 R 2.0 0.8 0:17.61 httpd
    2649 apache 20 0 447m 30m 4352 R 2.0 0.8 0:18.05 httpd
    2664 apache 20 0 451m 33m 4368 R 2.0 0.9 0:15.83 httpd
    2673 apache 20 0 447m 30m 4344 R 2.0 0.8 0:15.78 httpd
    2674 apache 20 0 450m 33m 4368 R 2.0 0.9 0:14.50 httpd
    2680 apache 20 0 447m 30m 4368 R 2.0 0.8 0:14.41 httpd
    2681 apache 20 0 450m 32m 4324 R 2.0 0.9 0:13.97 httpd
    2722 apache 20 0 450m 33m 4368 R 2.0 0.9 0:12.47 httpd
    2723 apache 20 0 446m 30m 4356 R 2.0 0.8 0:11.78 httpd
    2814 apache 20 0 451m 33m 4356 R 2.0 0.9 0:11.39 httpd
    2845 apache 20 0 450m 32m 4304 R 2.0 0.9 0:10.83 httpd
    2897 apache 20 0 451m 33m 4180 R 2.0 0.9 0:11.08 httpd
    2906 apache 20 0 450m 32m 4172 R 2.0 0.8 0:09.67 httpd
    2933 apache 20 0 450m 32m 4172 R 2.0 0.8 0:09.22 httpd
    2934 apache 20 0 450m 32m 4172 R 2.0 0.8 0:09.73 httpd
    2935 apache 20 0 450m 32m 4172 R 2.0 0.8 0:09.80 httpd
    2936 apache 20 0 447m 30m 4356 R 2.0 0.8 0:08.95 httpd
    2974 apache 20 0 447m 30m 4324 R 2.0 0.8 0:09.13 httpd
    2975 apache 20 0 450m 32m 4172 R 2.0 0.8 0:09.17 httpd
    2993 apache 20 0 451m 32m 4188 R 2.0 0.8 0:08.43 httpd
    2996 apache 20 0 451m 32m 4188 R 2.0 0.8 0:08.43 httpd
    3008 apache 20 0 447m 29m 4164 R 2.0 0.8 0:08.49 httpd
    3053 apache 20 0 451m 34m 4220 R 2.0 0.9 0:07.02 httpd
    3199 apache 20 0 447m 29m 4164 R 2.0 0.8 0:05.20 httpd
    3213 apache 20 0 447m 29m 4164 R 2.0 0.8 0:05.00 httpd
    3230 apache 20 0 446m 29m 4300 R 2.0 0.8 0:03.81 httpd
    1843 apache 20 0 450m 33m 4368 R 1.8 0.9 1:17.53 httpd
    1847 apache 20 0 451m 33m 4368 R 1.8 0.9 1:15.28 httpd
    1877 apache 20 0 447m 30m 4408 R 1.8 0.8 0:56.45 httpd
    2474 apache 20 0 451m 33m 4364 R 1.8 0.9 0:40.45 httpd
    2475 apache 20 0 449m 33m 4372 R 1.8 0.9 0:38.46 httpd
    2531 apache 20 0 451m 33m 4368 R 1.8 0.9 0:27.30 httpd
    2540 apache 20 0 449m 32m 4348 R 1.8 0.9 0:26.71 httpd
    2583 apache 20 0 451m 34m 4356 R 1.8 0.9 0:21.08 httpd
    2586 apache 20 0 449m 33m 4372 R 1.8 0.9 0:19.52 httpd
    2633 apache 20 0 451m 33m 4364 R 1.8 0.9 0:19.40 httpd
    2665 apache 20 0 448m 32m 4344 R 1.8 0.8 0:15.61 httpd
    2706 apache 20 0 450m 32m 4172 R 1.8 0.8 0:12.95 httpd
    --------------------------------------
    I have also checked
    [root@server ~]# cat /var/log/httpd/access_log
    and I see something really strange:
    157.55.35.88 - - [04/Mar/2013:20:54:16 +0100] "GET /robots.txt HTTP/1.1" 404 276 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
    157.55.35.88 - - [04/Mar/2013:20:56:25 +0100] "GET / HTTP/1.1" 200 3134 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
    ::1 - - [04/Mar/2013:21:09:55 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:09:59 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:01 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:02 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:03 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:05 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:06 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:20 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:27 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:30 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:52 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:53 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:54 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:10:55 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:00 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:09 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:11 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:12 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:23 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:25 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:26 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:27 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:32 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:36 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:37 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:40 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:54 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:55 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:58 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:11:59 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:12:00 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:12:21 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:12:22 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:12:27 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:12:39 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:12:46 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ....................................I had to cut some lines, as I could not submit the post.................................
    ::1 - - [04/Mar/2013:21:14:45 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:14:46 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    ::1 - - [04/Mar/2013:21:14:47 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache (internal dummy connection)"
    [root@server ~]#
    --------------------------------------
    And the reason I think there is something related with Plesk is that I can not even login to control Panel, I would expect that there should be at least this kind of management to allocate some resources for this process.

    Any idea is welcomed.
    Huge thanks in advance
     

    Attached Files:

  8. Cogeanu

    Cogeanu New Pleskian

    10
    35%
    Joined:
    Jan 18, 2013
    Messages:
    5
    Likes Received:
    0
    And here I have posted the output of the KB link from Igor (Parallels team): http://kb.parallels.com/264

    Apache Server Status for site.com

    Server Version: Apache/2.2.15 (Unix) DAV/2 mod_fcgid/2.3.6 mod_jk/1.2.31 mod_python/3.3.1 Python/2.6.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips mod_perl/2.0.4 Perl/v5.10.1
    Server Built: Feb 13 2012 22:31:42

    Current Time: Monday, 04-Mar-2013 21:26:22 CET
    Restart Time: Monday, 04-Mar-2013 20:50:57 CET
    Parent Server Generation: 0
    Server uptime: 35 minutes 24 seconds
    1 requests currently being processed, 19 idle workers

    ......................._................_...._................_.
    ........_..........._.........W....__.._........................
    ..._........_._._._.__._._..._..................................
    ................................................................

    Scoreboard Key:
    "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
    "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
    "C" Closing connection, "L" Logging, "G" Gracefully finishing,
    "I" Idle cleanup of worker, "." Open slot with no current process

    PID Key:

    2585 in state: _ , 2665 in state: _ , 2680 in state: _
    2809 in state: _ , 2845 in state: _ , 2909 in state: _
    2971 in state: W , 2976 in state: _ , 2981 in state: _
    2990 in state: _ , 3062 in state: _ , 3125 in state: _
    3131 in state: _ , 3133 in state: _ , 3135 in state: _
    3176 in state: _ , 3181 in state: _ , 3186 in state: _
    3194 in state: _ , 3230 in state: _ ,

    To obtain a full report with current status information you need to use the ExtendedStatus On directive.
    mod_fcgid status:
    Total FastCGI processes: 0
    SSL/TLS Session Cache Status:
    cache type: SHMCB, shared memory: 512000 bytes, current sessions: 0
    subcaches: 32, indexes per subcache: 133
    index usage: 0%, cache usage: 0%
    total sessions stored since starting: 0
    total sessions expired since starting: 0
    total (pre-expiry) sessions scrolled out of the cache: 0
    total retrieves since starting: 0 hit, 0 miss
    total removes since starting: 0 hit, 0 miss
    Apache Server at site.com Port 80
     
  9. Dmitriy S

    Dmitriy S Basic Pleskian

    11
    55%
    Joined:
    Mar 2, 2013
    Messages:
    37
    Likes Received:
    0
    No, you can ignore this rows.

    Try to ivestigate Apache access and error logs in your domain derectory. Usually it /var/www/vhosts/mydomain.com/statistics/

    Or may be it is better to askfor help from your hosters?
     
Loading...