LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what should i set in worker MPM and prefork MPM? (https://www.linuxquestions.org/questions/linux-newbie-8/what-should-i-set-in-worker-mpm-and-prefork-mpm-622772/)

modpriest 02-21-2008 07:56 AM

what should i set in worker MPM and prefork MPM?
 
My server have :
2G memory
2.4G Intel Duo Core
10,000G of IDE Hard Drive

I have set the default:
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 15
ServerLimit 1150
MaxClients 750
MaxRequestsPerChild 4000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 450
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

but some time the server and apache will jam and stop running!

What should i set for worker MPM and prefork MPM?

weisso5 02-21-2008 09:22 AM

Hello,
Please provide a bit more information:

1. Distro
2. Apache2 Version
3. Compile Options
4. Is this Web server or Apache2&SVN server


thanks,
weisso

modpriest 02-21-2008 01:52 PM

Is Http Apache 2.2 and compile with mod_deflate on fedora 6 server!

weisso5 02-21-2008 02:09 PM

Is this being used as just a primary webserver?

rg.viza 02-21-2008 05:23 PM

Quote:

Originally Posted by modpriest (Post 3064975)
My server have :
2G memory
2.4G Intel Duo Core
10,000G of IDE Hard Drive

I have set the default:
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 15
ServerLimit 1150
MaxClients 750
MaxRequestsPerChild 4000
</IfModule>

<IfModule worker.c>
StartServers 2
MaxClients 450
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

but some time the server and apache will jam and stop running!

What should i set for worker MPM and prefork MPM?

worker and prefork are threading models. The model you use determines what software is safe to run. Threading improves speed but if you run php and use a php extension that implements a library that's not threadsafe, it comprimises the php binary. Use prefork for this situation as it runs forked processes which are better "insulated" from each other.

What makes you sure it's the threading model locking up the server? Do you have error logs?

The best way to get to the bottom of it is to know what's in your stack.

What package did you use to install it?(source, rpm etc. important to know config directories)
What did you install with the httpd (php, perl, etc)
Can you post the error logs leading up to the crash?

do a
df -k and make sure you have free space available on the drive.

the way I set the flag for apache is when I compile I use the --with-mpm=prefork(fuzzy memory) flag when running configure, before compiling it on a host with such libraries being used in the web server. I think there is a way to set it to install both and let you choose with configuration. Never done that myself because I always just knew what to do when building it.

Here's the apache config page

be sure include the error logs for all virtual hosts running on the box. I usually separate them on my boxes. that way we'll know which site to shut down while we fix it ;)

-Viz

modpriest 02-21-2008 06:25 PM

thankx alot, after listening what you say i understand what should i do already! problem sloved!


All times are GMT -5. The time now is 01:54 PM.