Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Centos VPS that seems to have a lot of memory problems. First my hardware:

Processor Information

Processor #1 Vendor: GenuineIntel
Processor #1 Name: Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
Processor #1 speed: 198.721 MHz
Processor #1 cache size: 6144 KB

Processor #2 Vendor: GenuineIntel
Processor #2 Name: Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
Processor #2 speed: 198.721 MHz
Processor #2 cache size: 6144 KB

Processor #3 Vendor: GenuineIntel
Processor #3 Name: Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
Processor #3 speed: 198.721 MHz
Processor #3 cache size: 6144 KB

Processor #4 Vendor: GenuineIntel
Processor #4 Name: Intel(R) Xeon(R) CPU           E5405  @ 2.00GHz
Processor #4 speed: 198.721 MHz
Processor #4 cache size: 6144 KB


Memory Information


System Information

Linux server.server777.ro 2.6.18-028stab060.2 #1 SMP Tue Jan 13 10:24:09 MSK 2009 x86_64 x86_64 x86_64 GNU/Linux


Physical Disks


Current Memory Usage

             total       used       free     shared    buffers     cached
Mem:        525312     426224      99088          0          0          0
-/+ buffers/cache:     426224      99088
Swap:            0          0          0
Total:      525312     426224      99088


Current Disk Usage

Filesystem            Size  Used Avail Use% Mounted on
/dev/vzfs              30G   13G   18G  44% /
none                  7.9G  4.0K  7.9G   1% /dev

The memory seems to be generated by apache as the user nobody, on pages requests. The thing is that nothing on the code has changed. And i cant imagine what is causing this.

The websites hosted are not very popular, so there isnt so much trafic coming in.

How can i go about and diagnostic the problem. Thanks for any advice.

share|improve this question
1  
There doesn't appear to be any error messages posted - can you check your apache logs and post anything relevant, as well as anything your app displays during the failure. –  Greg Work Jul 6 '09 at 13:08
add comment

1 Answer

up vote 2 down vote accepted

When you run top, and sort by memory, is httpd at the top (several times)?

If your site isn't popular, you should be able to tweak the settings in httpd.conf to limit the number of StartServers, MaxSpareServers, MaxClients, ServerLimit, etc.

Also, you may want to consider something like nginx (http://nginx.net/) to act as a proxy to apache, which would almost certainly lower your memory footprint.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.