hi, i have a problem with apache. it works perfectly fine, but once in a time, it goes crazy and consumes all RAM which causes swapping and then basically disabling the whole server. normally there is 1-2 GB free RAM. this started to happen way more often lately, basically ever 20 minutes. specs: dedicated server intel xeon 2.6 Ghz 4 gb ram centos httpd -v: Server version: Apache/2.2.14 (Unix) any idea what can be causing this?
Sounds like your apache is spawning more servers/processes. It could also be a cronjob that spawns a script every min or more causing a domino effect with each process piling up on top of the other one. I'd start with looking at your 'prefork' settings and tune the server to consume a maximum amount of memory: Try these settings: <IfModule prefork.c> StartServers 64 MinSpareServers 5 MaxSpareServers 20 ServerLimit 64 MaxClients 64 MaxRequestsPerChild 100 </IfModule>
i bought a new server at different host and it works fine now. looking at your config, i think the value is too big with startservers (i have it at 20). also, maxclients is too low, i need at least 200.