How to Change the Memory Configuration in the Apache Server
One of the most popular web servers on the Internet is the Apache Web Server. The Apache server is a freely available, open-source project that can be used across all major operating systems. The server is free to download and deploy to run a website and is updated throughout the year as the project achieves major milestones. After you have installed the Apache server, however, you should change the default memory configurations to prevent server crash in the event of multiple, simultaneous users of the website you host with the server.
Instructions
-
-
1
Open the httpd.conf Apache configuration file in your computer's text editor.
-
2
Reduce the pre-fork configuration settings in the httpd.conf file to the following settings. This change will reduce the memory overhead required by the Apache Server for normal web-serving operations.
StartServers 3
MinSpareServers 3
MaxSpareServers 10
ServerLimit 50
MaxClients 50
MaxRequestsPerChild 2000If you are expecting significant site traffic or are already seeing significant traffic, consider setting these limits between the settings listed here and the default settings. The server limit and maximum-client figures should be set closer to 256 if on a dedicated server. If you are on a small VPS, increasing these settings can negatively impact the overall performance of your server.
-
-
3
Change the KeepAlive setting in the configuration file. This setting allows visitors to your website to issue multiple similar requests over the web connection. If you do not have a lot of images or Javascript on your website, you can toggle the KeepAlive setting to "off." If you do, reduce the default timeout value from 120 to 40 in the configuration file.
-
4
Save the Apache configuration file and restart your web server. You will see an improvement in the performance of the Apache webserver.
-
1