Please help tune apache
Here is some preview of our traffic.
~~![](<URL url=)
Here is our settings.
#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file. It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.2/ for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
# consult the online docs. You have been warned.
#
# The configuration directives are grouped into three basic sections:
# 1\. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
# 2\. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
# 3\. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path. If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "foo.log"
# with ServerRoot set to "/etc/apache2" will be interpreted by the
# server as "/etc/apache2/foo.log".
#
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE! If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at <url:http: httpd.apache.org="" docs="" 2.2="" mod="" mpm_common.html#lockfile="">);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"
#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
LockFile ${APACHE_LOCK_DIR}/accept.lock
#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300
#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On
#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100
#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 2
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<ifmodule mpm_prefork_module="">StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 256
MaxRequestsPerChild 0</ifmodule>
# worker MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
# graceful restart. ThreadLimit can only be changed by stopping
# and starting Apache.
# ThreadsPerChild: constant number of worker threads in each server process
# MaxClients: maximum number of simultaneous client connections
# MaxRequestsPerChild: maximum number of requests a server process serves
<ifmodule mpm_worker_module="">StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0</ifmodule>
# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxClients: maximum number of simultaneous client connections
# MaxRequestsPerChild: maximum number of requests a server process serves
<ifmodule mpm_event_module="">StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxClients 150
MaxRequestsPerChild 0</ifmodule>
# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives. See also the AllowOverride
# directive.
#
AccessFileName .htaccess
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<files ~="" "^\.ht"="">Order allow,deny
Deny from all
Satisfy all</files>
#
# DefaultType is the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value. If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
# It is also possible to omit any default MIME type and let the
# client's browser guess an appropriate action instead. Typically the
# browser will decide based on the file's extension then. In cases
# where no good assumption can be made, letting the default MIME type
# unset is suggested instead of forcing the browser to accept
# incorrect metadata.
#
DefaultType None
#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <virtualhost># container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <virtualhost># container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log
#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn
# Include module configuration:
Include mods-enabled/*.load
Include mods-enabled/*.conf
# Include all the user configurations:
Include httpd.conf
# Include ports listing
Include ports.conf
#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.
# Include generic snippets of statements
Include conf.d/
# Include the virtual host configurations:
Include sites-enabled/</virtualhost></virtualhost></url:http:>
~~
14 Replies
apache2 -V
I'm not sure if that will work with centos, you could try httpd -V
free -m
vmstat 1 10
I think that will do for now.
Server version: Apache/2.2.22 (Ubuntu)
Server built: Feb 13 2012 01:37:27
Server's Module Magic Number: 20051115:30
Server loaded: APR 1.4.6, APR-Util 1.3.12
Compiled using: APR 1.4.5, APR-Util 1.3.12
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with….
-D APACHEMPMDIR="server/mpm/prefork"
-D APRHASSENDFILE
-D APRHASMMAP
-D APRHAVEIPV6 (IPv4-mapped addresses enabled)
-D APRUSESYSVSEM_SERIALIZE
-D APRUSEPTHREAD_SERIALIZE
-D SINGLELISTENUNSERIALIZED_ACCEPT
-D APRHASOTHER_CHILD
-D APHAVERELIABLEPIPEDLOGS
-D DYNAMICMODULELIMIT=128
-D HTTPD_ROOT="/etc/apache2"
-D SUEXEC_BIN="/usr/lib/apache2/suexec"
-D DEFAULT_PIDLOG="/var/run/apache2.pid"
-D DEFAULTSCOREBOARD="logs/apacheruntime_status"
-D DEFAULT_LOCKFILE="/var/run/apache2/accept.lock"
-D DEFAULTERRORLOG="logs/errorlog"
-D APTYPESCONFIG_FILE="mime.types"
root@li493-33:~# vmstat 1 10
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 2632 90168 89692 626308 0 0 3 5 14 13 7 2 90 0
0 0 2632 90168 89692 626324 0 0 0 0 107 18 0 0 100 0
0 0 2632 90168 89692 626336 0 0 0 0 90 16 0 0 100 0
0 0 2632 90168 89692 626336 0 0 0 0 112 20 0 0 100 0
0 0 2632 90168 89692 626336 0 0 0 0 112 16 0 0 100 0
0 0 2632 90292 89692 626336 0 0 0 0 106 18 0 0 100 0
0 0 2632 90292 89692 626336 0 0 0 0 103 16 0 0 100 0
0 0 2632 90292 89692 626336 0 0 0 0 103 18 0 0 100 0
0 0 2632 90292 89692 626336 0 0 0 0 125 16 0 0 100 0
0 0 2632 90300 89692 626336 0 0 0 0 91 18 0 0 100 0
free -m
total used free shared buffers cached
Mem: 2018 1929 89 0 87 611
-/+ buffers/cache: 1229 788
Swap: 255 2 253
Is this what you need?
You could also consider switching to mpm-worker. Search the forums for "MaxClients" it's a common problem.
can you also do
ps aux | grep apache
ps aux | grep mysql
also when you paste, hit the code button above the input box so it looks like
{code]you paste here{/code] (but with square brackets, not curlys
also, is your app php?
www-data 25002 0.1 0.5 50348 11584 ? S 07:04 0:02 /usr/sbin/apache2 -k start
www-data 25006 0.0 0.6 50352 13616 ? S 07:04 0:01 /usr/sbin/apache2 -k start
www-data 25013 0.1 0.5 50348 11584 ? S 07:04 0:02 /usr/sbin/apache2 -k start
www-data 25027 0.1 0.5 50868 12040 ? S 07:04 0:02 /usr/sbin/apache2 -k start
www-data 25029 0.1 0.5 50348 11584 ? S 07:04 0:02 /usr/sbin/apache2 -k start
www-data 25032 0.1 0.5 50348 11576 ? S 07:04 0:02 /usr/sbin/apache2 -k start
www-data 25034 0.0 0.5 50096 10984 ? S 07:04 0:01 /usr/sbin/apache2 -k start
www-data 25903 0.1 0.6 50092 12416 ? S 07:12 0:01 /usr/sbin/apache2 -k start
www-data 25907 0.0 0.5 50348 11576 ? S 07:12 0:01 /usr/sbin/apache2 -k start
www-data 25919 0.0 0.5 50348 11476 ? S 07:12 0:01 /usr/sbin/apache2 -k start
www-data 25920 0.1 0.5 50352 11600 ? S 07:12 0:01 /usr/sbin/apache2 -k start
www-data 25921 0.1 0.5 50348 11584 ? S 07:12 0:01 /usr/sbin/apache2 -k start
www-data 25925 0.1 0.5 50452 11684 ? S 07:12 0:02 /usr/sbin/apache2 -k start
www-data 25926 0.0 0.5 50348 11580 ? S 07:12 0:01 /usr/sbin/apache2 -k start
www-data 25931 0.0 0.5 50348 11464 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25941 0.0 0.5 50348 11480 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25944 0.0 0.5 50348 11580 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25953 0.0 0.5 50720 12028 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25963 0.1 0.5 50348 11352 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25966 0.1 0.5 50348 11580 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25970 0.0 0.6 52144 13300 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25972 0.0 0.5 50348 11588 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25974 0.1 0.6 52144 13308 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25979 0.0 0.5 50352 11572 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25980 0.1 0.5 50348 11580 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25981 0.0 0.5 50340 11440 ? S 07:13 0:00 /usr/sbin/apache2 -k start
www-data 25983 0.2 0.6 50868 13248 ? S 07:13 0:03 /usr/sbin/apache2 -k start
www-data 25984 0.0 0.6 50612 13068 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25985 0.1 0.5 50348 11360 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25987 0.1 0.5 50348 11580 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25993 0.1 0.5 50352 11596 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25994 0.0 0.5 49324 10416 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25995 0.0 0.5 50352 11484 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 25998 0.0 0.5 50348 11584 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26006 0.1 0.5 50868 12036 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26007 0.1 0.5 50348 11580 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26008 0.1 0.5 50612 11996 ? S 07:13 0:02 /usr/sbin/apache2 -k start
www-data 26010 0.1 0.5 50348 11476 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26011 0.0 0.5 50352 11584 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26013 0.0 0.5 50348 11576 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26020 0.1 0.5 50868 12044 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26024 0.1 0.5 50348 11584 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26025 0.0 0.5 50720 11876 ? S 07:13 0:01 /usr/sbin/apache2 -k start
www-data 26048 0.0 0.5 50220 11356 ? S 07:16 0:00 /usr/sbin/apache2 -k start
www-data 26055 0.0 0.5 50348 11588 ? S 07:16 0:01 /usr/sbin/apache2 -k start
www-data 26058 0.0 0.5 50464 11576 ? S 07:16 0:00 /usr/sbin/apache2 -k start
www-data 26067 0.0 0.5 50340 11448 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26068 0.0 0.5 50084 11180 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26072 0.0 0.6 50464 13028 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26073 0.0 0.5 50348 11580 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26074 0.0 0.6 50228 12656 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26075 0.1 0.5 50348 11588 ? S 07:17 0:02 /usr/sbin/apache2 -k start
www-data 26077 0.0 0.5 50340 11576 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26080 0.0 0.5 50092 11228 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26082 0.1 0.6 50348 12764 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26083 0.0 0.5 50340 11232 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26085 0.0 0.5 50348 11476 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26089 0.0 0.5 50340 11320 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26090 0.0 0.5 50348 11572 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26092 0.0 0.5 50348 11484 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26096 0.0 0.5 50348 11460 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26100 0.0 0.5 50348 11584 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26101 0.1 0.5 50352 11740 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26103 0.0 0.5 50348 11580 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26104 0.0 0.5 50348 11584 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26105 0.0 0.5 50348 11460 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26106 0.0 0.5 50352 11580 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26107 0.0 0.5 50340 11428 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26110 0.0 0.5 50348 11364 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26111 0.1 0.5 50348 11588 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26118 0.0 0.5 50720 12092 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26119 0.0 0.5 50868 12028 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26121 0.0 0.5 50604 11968 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26123 0.0 0.5 50712 11636 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26124 0.0 0.5 50340 11456 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26126 0.1 0.6 50348 12736 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26127 0.0 0.5 50352 11512 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26128 0.0 0.5 50720 11900 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26133 0.0 0.5 50096 11072 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26134 0.1 0.5 50352 11576 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26135 0.1 0.5 50348 11576 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26137 0.1 0.5 50348 11488 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26141 0.0 0.5 49584 10708 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26142 0.0 0.6 52144 13320 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26144 0.0 0.5 50340 11568 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26147 0.0 0.5 50352 11512 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26148 0.0 0.5 50348 11376 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26149 0.0 0.5 49572 10596 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26150 0.0 0.5 50352 11584 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26152 0.0 0.5 50868 12036 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26154 0.0 0.5 50348 11472 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26155 0.0 0.5 50348 11576 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26156 0.0 0.5 50348 11464 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26161 0.0 0.5 49580 10652 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26166 0.1 0.5 49584 10732 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26167 0.0 0.5 50348 11484 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26169 0.1 0.6 52144 13424 ? S 07:17 0:02 /usr/sbin/apache2 -k start
www-data 26170 0.0 0.5 50340 11560 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26171 0.0 0.5 49580 10720 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26172 0.0 0.6 52144 13196 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26174 0.0 0.5 50348 11588 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26175 0.0 0.5 50352 11464 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26177 0.0 0.5 50348 11468 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26178 0.0 0.5 50092 11132 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26179 0.0 0.5 50352 11464 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26181 0.0 0.5 50084 11076 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26183 0.0 0.5 50348 11576 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26184 0.0 0.5 50348 11472 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26185 0.1 0.5 50348 11576 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26187 0.0 0.5 50712 11892 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26190 0.0 0.5 50352 11464 ? S 07:17 0:00 /usr/sbin/apache2 -k start
www-data 26191 0.1 0.6 52144 13304 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26192 0.1 0.5 50352 11628 ? S 07:17 0:01 /usr/sbin/apache2 -k start
www-data 26194 0.0 0.6 52136 13288 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26195 0.0 0.5 50348 11476 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26198 0.1 0.5 51076 12360 ? S 07:23 0:01 /usr/sbin/apache2 -k start
www-data 26199 0.0 0.5 50340 11316 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26200 0.1 0.5 50760 12148 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26201 0.0 0.5 50340 11412 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26202 0.0 0.5 50352 11544 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26203 0.1 0.5 50092 11156 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26204 0.0 0.5 50348 11480 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26205 0.0 0.5 50340 11428 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26206 0.0 0.5 50352 11428 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26207 0.0 0.6 50340 12744 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26208 0.1 0.5 49580 10724 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26209 0.0 0.5 50348 11348 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26210 0.0 0.5 50352 11352 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26213 0.0 0.5 50464 11840 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26214 0.0 0.6 51756 13040 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26215 0.0 0.5 50340 11312 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26216 0.0 0.5 50340 11444 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26217 0.1 0.6 50348 12684 ? S 07:23 0:01 /usr/sbin/apache2 -k start
www-data 26218 0.1 0.5 50612 12036 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26219 0.0 0.5 50340 11284 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26220 0.0 0.5 50352 11360 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26221 0.0 0.5 50340 11444 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26223 0.0 0.5 50456 11380 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26224 0.0 0.5 50352 11540 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26225 0.0 0.5 50348 11572 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26226 0.0 0.5 50348 11352 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26227 0.0 0.5 50604 11972 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26228 0.0 0.5 50348 11436 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26229 0.0 0.5 50348 11552 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26230 0.0 0.5 50352 11352 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26232 0.1 0.5 50348 11584 ? S 07:23 0:01 /usr/sbin/apache2 -k start
www-data 26234 0.1 0.6 52012 13308 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26235 0.0 0.5 50348 11460 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26237 0.0 0.5 50348 11348 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26238 0.0 0.5 50340 11548 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26240 0.0 0.5 50340 11276 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26242 0.0 0.6 50348 12608 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26244 0.0 0.5 50348 11472 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26245 0.1 0.5 50348 11484 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26247 0.0 0.5 50340 11316 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26248 0.0 0.5 50456 11444 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26249 0.0 0.5 50352 11248 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26250 0.0 0.5 50348 11464 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26252 0.0 0.5 50352 11244 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26253 0.0 0.5 50340 11316 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26254 0.0 0.5 50340 11316 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26255 0.0 0.5 50348 11576 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26256 0.0 0.5 50352 11580 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26257 0.0 0.5 50340 11312 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26258 0.0 0.5 50340 11372 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26259 0.0 0.5 50348 11468 ? S 07:23 0:00 /usr/sbin/apache2 -k start
www-data 26261 0.0 0.5 50352 11464 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26262 0.0 0.5 50348 11580 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26263 0.0 0.5 50352 11356 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26264 0.0 0.5 50348 11572 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26266 0.0 0.5 51124 12264 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26267 0.0 0.5 50376 11508 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26268 0.0 0.5 50348 11572 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26269 0.1 0.6 50352 13568 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26270 0.0 0.5 50092 11092 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26272 0.0 0.5 50352 11364 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26273 0.0 0.5 50348 11576 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26275 0.0 0.5 50860 11900 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26276 0.0 0.5 50464 11488 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26277 0.0 0.5 50348 11464 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26278 0.0 0.5 50464 11480 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26279 0.0 0.5 50228 11352 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26280 0.0 0.5 50352 11472 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26281 0.0 0.5 50348 11564 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26282 0.0 0.5 50348 11576 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26283 0.0 0.5 50604 11972 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26284 0.0 0.5 50348 11476 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26286 0.0 0.5 50340 11560 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26287 0.1 0.5 50348 11576 ? S 07:24 0:01 /usr/sbin/apache2 -k start
www-data 26288 0.0 0.5 50348 11236 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26289 0.0 0.5 50352 11352 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26290 0.0 0.5 50340 11448 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26291 0.0 0.5 50352 11580 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26292 0.0 0.5 50352 11344 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26293 0.0 0.5 50352 11476 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26294 0.0 0.5 50456 11452 ? S 07:24 0:00 /usr/sbin/apache2 -k start
www-data 26299 0.1 0.5 50348 11456 ? S 07:34 0:00 /usr/sbin/apache2 -k start
www-data 26303 0.0 0.5 50340 11292 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26305 0.0 0.5 50340 11312 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26306 0.5 0.4 48812 10192 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26307 0.1 0.5 50352 11576 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26308 0.0 0.5 50340 11304 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26309 0.1 0.5 50348 11460 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26310 0.0 0.5 50084 10664 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26311 0.0 0.5 50172 10680 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26312 0.4 0.6 51764 14108 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26313 0.0 0.5 50340 11284 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26314 0.0 0.5 50348 11328 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26315 0.3 0.5 50348 11456 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26316 0.4 0.5 50348 11576 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26318 0.0 0.4 49572 10180 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26319 0.3 0.5 50348 11588 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26320 0.1 0.5 50340 11444 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26321 0.4 0.5 50604 11972 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26322 0.1 0.5 50352 11352 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26323 0.0 0.5 50084 10696 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26324 0.0 0.5 50172 10676 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26325 0.0 0.5 50340 11308 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26326 0.0 0.5 50352 11336 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26327 0.0 0.5 50348 11336 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26328 0.3 0.5 49580 10620 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26329 0.1 0.5 50348 11348 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26330 0.0 0.5 50348 11340 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26331 0.3 0.5 50868 11804 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26332 0.1 0.5 50612 11736 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26333 0.1 0.6 52136 13084 ? S 07:35 0:00 /usr/sbin/apache2 -k start
www-data 26334 0.3 0.6 50340 12624 ? S 07:35 0:00 /usr/sbin/apache2 -k start
root 26340 0.0 0.0 4372 832 pts/1 R+ 07:38 0:00 grep --color=auto apache
root@li493-33:~# ps aux | grep mysql
root 26456 0.0 0.0 4368 836 pts/1 S+ 07:39 0:00 grep --color=auto mysql
````
Here sir? Yes its Php.
2000/12 = 166
so your maxclients should be lower than 160.
something like
<ifmodule mpm_prefork_module="">StartServers 20
MinSpareServers 20
MaxSpareServers 40
MaxClients 150
MaxRequestsPerChild 9000</ifmodule>
The min and maxspareservers isn't too important, maxclients is, maxrequestperchild helps if there is a memory leak.
This won't make apache handle more load, it will stop it using more memory than you have available, and it won't
fall over during high load. during high load, clients won't get connection reset by peer, but it might take a few seconds
for the page to start loading.
are you running a database on that box? maybe postgresql?
are you serving images, css and javascript too?
I'll add that you currently have over 200 apache processes, and some of them have been running for quite a few seconds.
1 would definitely turn off keepalives, and maybe try gradually reducing maxclients, and rerun free -m and vmstat 1 10
and when you answer the question about serving images, css and js, I can add some for things for you to think about/try
Thanks!
so nginx will serve static content and forward php requests to apache.
there are 100s of guides available on how to do this.
you could also put all your static content on s3 to free up apache
and something like varnish will take the load off apache, too.
but that is harder to set up for a dynamic site.
atm your pages are so slow to load, that each apache process is running for
minutes trying to finish a request. you've got to get that down to seconds.
if all else fails, upgrade the plan. it looks like you have more users than
apache processes.
sudo nano /etc/apache2/apache2.conf
make a copy of the file before you change it
sudo cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf-2013-01-08
consider hiring a sysadmin
service apache2 restart
to restart apache
files2.flippish.com seems to be the problem atm, it's not even a linode.
it might be my connection too, my adsl is down and I'm on a dodgy 3g connection
<ifmodule mpm_prefork_module="">StartServers 20
MinSpareServers 20
MaxSpareServers 40
MaxClients 150
MaxRequestsPerChild 9000</ifmodule>
But it became slow. Does it take long to restart this?
Thanks!
try maxclients of 200
also, are you sure it's
anyway, I can't help any more than I already have, hopefully someone else can give you a hand.