Author |
|
bie_bot
Joined: 20 Feb 2012 Posts: 3
|
Posted: Mon 20 Feb '12 14:16 Post subject: Compiling Apache 2.2.22 with MPM = worker |
|
|
Hi all,
I am trying to compile Apache 2.2.22 using Microsoft Visual Studio 2008 but having difficulties to change default MPM from winnt to worker.
Does anyone know how to do this?
Thanks in advance.
Best regards,
Robbi |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Mon 20 Feb '12 15:16 Post subject: |
|
|
Under windows you can only use winnt mpm. Other will not work. |
|
Back to top |
|
bie_bot
Joined: 20 Feb 2012 Posts: 3
|
Posted: Mon 20 Feb '12 16:11 Post subject: |
|
|
Thanks for the fast reply.
Well, may be I have to switch to *nix one. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 21 Feb '12 20:39 Post subject: |
|
|
The question is why you so badly want worker mpm, that winnt can't do? |
|
Back to top |
|
bie_bot
Joined: 20 Feb 2012 Posts: 3
|
Posted: Wed 22 Feb '12 17:12 Post subject: |
|
|
I had apache web server (winnt based MPM) on my production server running smoothly until someday more than 3000 requests were coming at the same time for a whole day.
In that day, my apache got hung and couldn't serve any request so I had to restart the service. And happened again after restarting.
After investigating the process via task manager, I realized too many threads were opened by httpd process. I need to spawn the httpd process into several processes so it can be balanced among the processes.
That's way I need more than one process of httpd to run on my web server. For your information, machine resource usage is very low (CPU < 10%, memory < 25%).
Do you have any better idea? |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Wed 22 Feb '12 20:51 Post subject: |
|
|
Buy better hardware Often the harddisk is a bottle neck. More often PHP blow up apache, that's why I and many others use mod_fcgid to separate PHP from apache process.
There is a dicussion about how good apache is compared on windows to *nix system.
http://marc.info/?l=apache-httpd-dev&m=132992476215664&w=2
Best performance I ever had and have is running apache on FreeBSD with event mpm, not worker mpm. That is also only the case without SSL. With SSL event mpm performs just like worker mpm.
Of cause there are "might" some disadvantages using a *nix system. Replacing the binaries is not that easy. Specialy on *BSD system you have to compile it from source. Well I guess if you want to have the newest version of apache you have to compile it on a linux system as well.
On Windows you can force apache to restart apache after n requests via MaxRequestsPerChild. The default value 0 is to run it unlimited. Using a different value will let apache restart the child process after that number of requests. I used that before I knew mod_fcgid to keep my apache alive when PHP blow the memory up.
Also an option is to run one apache as a load balancer and two or more apache on different boxes. Than apache is able to serv more. That cost money, but it is worth to try. |
|
Back to top |
|