Apache is using too much of my server memory causing it to crash. I have 4GB of RAM in the server.
I'm trying to fine tune Apache settings in order to improve it's performance but I'm quite new at this.
I was trying to follow this article's advice but I'm not sure how to calculate things and it seems I'm making it worse.
My top reads like:
11697 apache 15 0 322m 37m 4048 S 0.0 0.9 0:00.52 httpd
13602 apache 15 0 323m 37m 3944 S 0.0 0.9 0:00.50 httpd
11786 apache 15 0 322m 36m 4052 S 0.0 0.9 0:00.50 httpd
12525 apache 15 0 322m 36m 4040 S 0.0 0.9 0:00.63 httpd
11806 apache 15 0 322m 36m 3952 S 0.0 0.9 0:00.42 httpd
11731 apache 15 0 322m 36m 4036 S 0.0 0.9 0:00.46 httpd
11717 apache 16 0 322m 36m 3956 S 0.0 0.9 0:00.54 httpd
11659 apache 15 0 322m 36m 3980 S 0.0 0.9 0:00.49 httpd
So, it would be
MaxClients = 3000/ (322-37) = 10
Is that right? Also, what should be the values for the other parameters such as MinSpareServers, MaxSpareServers,MaxRequestsPerChild, StartServers, MinSpareThreads, MaxSpareThreads, ThreadsPerChild, MaxRequestsPerChild ?
Would someone please help me?
Update
I've tried what you guys have suggested. It works, but just for a while. After some time after the server is started memory usage keeps increasing and never goes down.
I mean, after I start the server, let's assume there'are 500 users online. Server will consume X RAM. 2 hours after that, with the same 500 users online, server will be consuming 10X RAM.
Is there a way to avoid this or I'll have to keep watching the server and restarting it from time to time?
Comments
Post a Comment