Skip to content

Instantly share code, notes, and snippets.

@janewang
Created February 2, 2015 23:20
Show Gist options
  • Save janewang/bb85fad658b839a183c9 to your computer and use it in GitHub Desktop.
Save janewang/bb85fad658b839a183c9 to your computer and use it in GitHub Desktop.
Apache needs to fork a process to handle each connected client.
The upshot is that you have lots of processes because you have lots of connections. If your server is running slowly as a result then here are a few options:
Optimise your application: profile your application's code and try and optimise the areas that place the most load on the server.
Consider changing to a lower impact web server, such as nginx. This could increase the number of connections that your server can handle.
Add page caching, using something like varnish
Add another server, and load balance between them
Increase the capabilities of the existing server (e.g. increase RAM, upgrade processor, install a faster hard disk).
All of these options have a cost, in time or money. Unfortunately that's just the way it is :)
The quickest wins in my opinion would probably be options 2 and 3. But it means downtime while they're being installed, or having a backup server to work on.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment