Quote:
Originally Posted by modpriest
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