Server memory problem

Hello,

I am having a memory problems on my server. Server load looks ok. When i restart apache memory goes up to normal.

There are only 4 sites on it but they have quite big web traffic like 150.000 page loads daily. 2 of them use mysql + php and the rest are html.

I think the problem is mysql and apache. I want to paste here my http.conf and my.cnf so that you may advice..

http.conf
=========

Timeout 300

KeepAlive Off

MaxKeepAliveRequests 100

KeepAliveTimeout 3

<IfModule prefork.c>
StartServers 5
MinSpareServers 32
MaxSpareServers 64
MaxClients 256
MaxRequestsPerChild 0
</IfModule>

<IfModule worker.c>
StartServers 5
MaxClients 256
MinSpareThreads 32
MaxSpareThreads 64
ThreadsPerChild 25
MaxRequestsPerChild 0

my.cnf
=============
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

[mysqld]
port = 3306
skip-locking
skip-innodb
set-variable = key_buffer=8M
set-variable = max_allowed_packet=2M
set-variable = table_cache=1024
set-variable = sort_buffer=2M
set-variable = join_buffer_size=1M
set-variable = record_buffer=1M
set-variable = myisam_sort_buffer_size=8M
set-variable = max_connections=300
set-variable = max_connect_errors=65535
set-variable = wait_timeout=14400
set-variable = thread_cache_size=256
set-variable = back_log=512
set-variable = connect_timeout=30
set-variable = tmp_table_size=4M

[safe_mysqld]
open_files_limit=8192

[mysqldump]
quick
set-variable = max_allowed_packet=16M

[myisamchk]
set-variable = key_buffer=16M
set-variable = sort_buffer=16M
set-variable = read_buffer=4M
set-variable = write_buffer=4M

[mysqlhotcopy]
interactive-timeout


Pls help.

 

 

 

 

Top