Possible Duplicate:
What options do I have, to replace Apache web server?

I need a web server that runs php and does not create so many processes (today I checked the running processes list and there were like 90 of them called 'httpd', 300kb each), I only know these but I don't know if they will do the same or not:

  • ngix
  • lighttpd

marked as duplicate by Zoredache, mailq, jscott, John Gardeniers, EEAA Sep 21 '11 at 0:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Sep 20 '11 at 23:10

This question came from our site for professional and enthusiast programmers.

  • 1
    fix your appache install, there's no need to replace it, – Dagon Sep 20 '11 at 22:45
  • 1
    What is the actual problem here? Are you just looking to replace Apache 'because' or is there an actual problem like crashing or swapping or slowness? If 'like 90' processes is a problem, this can be remedied by analyzing and fixing the configuration. – slillibri Sep 20 '11 at 23:14
  • What is wrong with having 90 processes? If have a server with enough resources and a heavily loaded site, that might be a good number. – Zoredache Sep 20 '11 at 23:15
  • Regardless of whether you keep or replace Apache, you need to adjust your configuration to suit your system and your requirements. If you have limited resources on the server have a read of some of the numerous articles about configuring Apache to suit. – John Gardeniers Sep 21 '11 at 0:16

What is your problem with the processes? They are just like threads. Would you mind a single process at 27,000kb?

Anyway, you should make sure to use FastCGI for PHP, as this won’t spawn a new php-process each request, but use one again and again. This may also reduce memory footage.

FastCGI is included in lighttpd and also works in Apache httpd.

  • Process are not just like threads: they are similar in some ways, but vastly different in others. – pst Sep 20 '11 at 22:41
  • mod_php never spawns PHP processes. runs – Ignacio Vazquez-Abrams Sep 20 '11 at 22:41
  • Yea, you need one thread per connected user so if you have a busy site, expect there to be a lot of httpd processes spawning and dying. – drew010 Sep 20 '11 at 22:42
  • @drew010 The number of threads (and/or process) required per connection is highly dependent upon web-server and configuration. – pst Sep 20 '11 at 22:43

The best for performance is without a doubt nginx. I have run nginx before on a 128MB VPS with Sql lite without any issues.

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