LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-21-2008, 07:56 AM   #1
modpriest
Member
 
Registered: Dec 2007
Posts: 32

Rep: Reputation: Disabled
Question 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?
 
Old 02-21-2008, 09:22 AM   #2
weisso5
Member
 
Registered: Oct 2007
Location: New York City
Distribution: Gentoo, FC
Posts: 133

Rep: Reputation: 16
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

Last edited by weisso5; 02-21-2008 at 09:25 AM.
 
Old 02-21-2008, 01:52 PM   #3
modpriest
Member
 
Registered: Dec 2007
Posts: 32

Original Poster
Rep: Reputation: Disabled
Is Http Apache 2.2 and compile with mod_deflate on fedora 6 server!
 
Old 02-21-2008, 02:09 PM   #4
weisso5
Member
 
Registered: Oct 2007
Location: New York City
Distribution: Gentoo, FC
Posts: 133

Rep: Reputation: 16
Is this being used as just a primary webserver?
 
Old 02-21-2008, 05:23 PM   #5
rg.viza
Member
 
Registered: Aug 2006
Posts: 74

Rep: Reputation: 15
Quote:
Originally Posted by modpriest View Post
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

Last edited by rg.viza; 02-21-2008 at 05:51 PM.
 
Old 02-21-2008, 06:25 PM   #6
modpriest
Member
 
Registered: Dec 2007
Posts: 32

Original Poster
Rep: Reputation: Disabled
thankx alot, after listening what you say i understand what should i do already! problem sloved!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i tell if apache 2 is prefork or worker? sneakyimp Linux - Software 4 09-15-2007 02:15 PM
Apache - change to worker MPM rjcrews Linux - Software 2 03-22-2006 06:28 AM
Replacing apache2-mpm-prefork iNeo Debian 1 02-06-2006 02:17 PM
Apache + Suse 9.3 + MPM worker Suinatsa Linux - Software 1 01-31-2006 02:22 PM
Apache2 & prefork MPM, PHP4 XTJ7 Linux - Software 6 04-29-2004 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration