Newbie help with apache/mysql
Upgrading our memory has made no difference. I have attempted to follow the instructions in the low memory settings but this hasn't made any difference either.
We have on average around 20 users online at any given time, this has never risen above 50 users online at a time.
Here's what our top looks like, I don't really understand the ins and outs of what this is showing, but from what I can gather apache seems to be using 200mb, is that normal?
2152 mysql 20 0 330m 50m 6620 S 0 6.8 0:02.32 mysqld
2856 www-data 20 0 206m 19m 4008 S 0 2.7 0:01.12 apache2
2870 www-data 20 0 206m 19m 3648 S 0 2.6 0:00.39 apache2
2872 www-data 20 0 206m 19m 3660 S 0 2.6 0:00.24 apache2
2882 www-data 20 0 206m 19m 3676 S 0 2.6 0:00.40 apache2
2866 www-data 20 0 206m 19m 3632 S 0 2.6 0:00.27 apache2
2803 www-data 20 0 205m 18m 3692 S 0 2.5 0:00.71 apache2
2877 www-data 20 0 205m 18m 3652 S 0 2.5 0:00.41 apache2
2852 www-data 20 0 202m 16m 3972 S 0 2.2 0:01.00 apache2
2885 www-data 20 0 202m 15m 3576 S 0 2.1 0:00.34 apache2
2854 www-data 20 0 202m 15m 3696 S 0 2.1 0:00.82 apache2
2873 www-data 20 0 200m 13m 3664 S 6 1.9 0:00.65 apache2
2884 www-data 20 0 200m 13m 3652 S 0 1.8 0:00.42 apache2
2861 www-data 20 0 200m 13m 3660 S 0 1.8 0:00.88 apache2
2887 www-data 20 0 200m 13m 3568 S 0 1.8 0:00.35 apache2
2881 www-data 20 0 197m 10m 3888 S 0 1.5 0:00.65 apache2
2865 www-data 20 0 197m 10m 3648 S 0 1.4 0:00.22 apache2
2480 root 20 0 193m 10m 5068 S 0 1.4 0:00.57 apache2
2874 www-data 20 0 196m 10m 4008 S 0 1.4 0:01.11 apache2
2864 www-data 20 0 194m 6956 1076 S 0 0.9 0:00.06 apache2
2871 www-data 20 0 194m 6712 856 S 0 0.9 0:00.06 apache2
2875 www-data 20 0 194m 6712 856 S 0 0.9 0:00.05 apache2
2876 www-data 20 0 194m 6712 860 S 0 0.9 0:00.06 apache2
2879 www-data 20 0 194m 6712 860 S 0 0.9 0:00.05 apache2
2883 www-data 20 0 194m 6712 860 S 0 0.9 0:00.06 apache2
2886 www-data 20 0 194m 6712 860 S 0 0.9 0:00.05 apache2
Here is our my.cnf:
key_buffer = 192M
maxallowedpacket = 1M
thread_stack = 64K
threadcachesize = 8
This replaces the startup script and checks MyISAM tables if needed
the first time they are touched
myisam-recover = BACKUP
max_connections = 30
table_cache = 300
sort_buffer = 64K
netbufferlength = 2K
And apache2.conf:
StartServers 1
MinSpareServers 3
MaxSpareServers 6
ServerLimit 24
MaxClients 24
MaxRequestsPerChild 3000
Up until about a week ago everything was fine on the site, however we are running out of memory every day now and nothing has changed that I can see on the site (traffic hasn't really increased etc).
Has anyone got any tips as to what the problem could be? Bearing in mind I am quite new to Linode - this is a steep learning curve for me. I am beginning to wish I had gone for a managed solution now.
Thanks for any help you can give me
5 Replies
core_module (static)
logconfigmodule (static)
logio_module (static)
mpmpreforkmodule (static)
http_module (static)
so_module (static)
alias_module (shared)
authbasicmodule (shared)
authnfilemodule (shared)
authzdefaultmodule (shared)
authzgroupfilemodule (shared)
authzhostmodule (shared)
authzusermodule (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
reqtimeout_module (shared)
setenvif_module (shared)
status_module (shared)
how many requests are you handling per second?
have you considered moving to apache2-mpm-worker + mod_fcgid (for php)? I found that combination to perform well (>100 req /sec) on a Linode 512 box (Apache2/PHP/PostgreSQL)
how much is mysql effectively using?
it seems like your website could run on a linode 256MB so I'm kinda surprised…
Try setting max clients to around 5 then increasing slowly if need be.