Make sure you have enough system RAM.
According to the documentation, you need 2GB. Even for a VPS where you can "burst" above your pre-paid limit, it pays to have it when the system needs.
Disable any apache modules you aren't using.
Disabling modules you don't need reduces Apache's memory needs, often siginificantly.
Try modifying your apache2.conf to optomize performance.
The two things below should give you a place to start. You'll need to watch the server and tweak as needed based on your traffic. YMMV.
Code:
<IfModule prefork.c>
StartServers 3
MinSpareServers 2
MaxSpareServers 3
MaxClients 15
MaxRequestsPerChild 5000
</IfModule>
And
Code:
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 2
Try modifying your /etc/php5/php.ini to optomize performance
If you are already at or above 64M, try increasing it.
Code:
php_value memory_limit 64M
Try modifying your /etc/mysql/my.cnf to optomize performance
Again, if you are at or above these memory limits, try increasing them to see if they have an impact on your problem.
Code:
set-variable=max_connections=15
set-variable=max_user_connections=15
set-variable=query_cache_limit=16M
set-variable=query_cache_size=64M
set-variable=query_cache_type=1
Bookmarks