On 12. 1. 2011 19:59, Kaddeh wrote:
P4 @ 3.0Ghz 2GB PC2 4200 2x 250GB drives in RAID1 The system configurations are default for the most part with the server running MySQL and Apache. The problem that I am running into at this point, however is that the machine seems to run out of memory and will segfault either apache or mysql when does so, when apache segfaults, it is a recoverable error, when mysql does it, mysql can't recover short of restarting it. At this point, I have found a soft fix by running a cron job every 6 hours or so to clear the cached memory, which seems to be the problem, however, I would like to find a more permanent fix to this issue.
First of all, find what is causing that excessive memory usage. I think 2GB should be enough for moderate web with apache+mysql. Second, use some monitoring software. Personally I'm using "monit" and I am very satisfied with it. It can monitor processes (if it is running, answering requests, etc), resources (disk, memory, swap, cpu, i/o), files (content, permissions, checksums), remote hosts (with some basic protocol checks i.e. http, ssh, smtp, ftp, mysql, ntp, dns...), it can inform you about problems (mail, log) and you can define rules what to do in case of anomalies (i.e. if mysql is using to much memory, it will be restarted). It can start/restart processes if they die (happened to me once with sshd on server which was ~50 miles away from me). You can put monit in inittab, so in case monit itself dies it is restarted automatically. Etc, etc. Jarry -- _______________________________________________________________ This mailbox accepts e-mails only from selected mailing-lists! Everything else is considered to be spam and therefore deleted.