>>>>> I ran into an out of memory problem.  The first mention of it in the
>>>>> kernel log is "mysqld invoked oom-killer".  I haven't run into this
>>>>> before.  I do have a swap partition but I don't activate it based on
>>>>> something I read previously that I later found out was wrong so I
>>>>> suppose I should activate it.  Is fstab the way to do that?  I have a
>>>>> commented line in there for swap.
...
> Also, run a caching proxy if at all possible. That made the single
> biggest difference for my server.
>
> Other useful things:
> * Set the MaxRequestsPerChild to something like 450. As part of their
> caching, things like mod_php will grow the process size a bit as the
> apache process gets old in the tooth. Setting MaxRequestsPerChild
> lower causes the process to expire and be replaced sooner. On my
> server, I see apache processes consume about 60MB towards the end, and
> then cycle back and consume about 22MB.

Default is 10000 so 450 might be too low.

> * On my server, I have MinSpareServers at 10, and MaxSpareServers at
> 12. I handle spikes pretty well, and free the memory quickly.

I use 20 and 40 for Min and Max respectively.

> * If you're using PHP, set memory_limit in php.ini as low as your
> applications can survive.
>
> I'm assuming you're running on a VPS or similar. At 512MB of RAM with
> a web server and database server, you need to keep things very tight.

I have 4GB RAM.  512MB is the size of my currently unused swap partition.

- Grant

Reply via email to