about ServerLimit and ThreadLimit

--00504502f52d0673da047aad58ab
Content-Type: text/plain; charset=UTF-8

Hello,

On the documentation of Apache2.2

ServerLimit <../mod/mpm_common.html#serverlimit>is a hard limit on the
number of active child processes, and must be greater than or equal to the
MaxClients <../mod/mpm_common.html#maxclients> directive divided by the
ThreadsPerChild <../mod/mpm_common.html# threadsperchild> directive.
ThreadLimit <../mod/mpm_common.html#threadlimit> is a hard limit of the
number of server threads, and must be greater than or equal to the
ThreadsPerChild <../mod/mpm_common.html#threadsperchild> directive.

I did like above on worker MPM but server reached Max connection when 256th
connection come.

<IfModule mpm_worker_module>
StartServers 5
MaxClients 350
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
ServerLimit 40
ThreadLimit 40
</IfModule>

Is there something wrong in my configuration ?

Regards,
Tseveen.

--00504502f52d0673da047aad58ab
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello,<div><br></div><div>On the documentation of Apache2.2=C2=A0</div><div=
><br></div><div><span class=3D"Apple-style-span" style=3D"font-family: Aria=
l, Helvetica, sans-serif; font-size: 14px; color: rgb(0, 51, 102); line-hei=
ght: 18px; "><code class=3D"directive" style=3D"font-family: 'Courier N=
ew', Courier, monospace; font-size: 1em; color: rgb(40, 127, 0); backgr=
ound-color: inherit; "><a href=3D"../mod/mpm_common.html#serverlimit
" style=3D"color: rgb(40, 127, 0); background-color: inherit; ">ServerL=
imit=C2=A0</a></code>is a hard limit on the number of active child processe=
s, and must be greater than or equal to the=C2=A0<code class=3D"directive" =
style=3D"font-family: 'Courier New', Courier, monospace; font-size:=
1em; color: rgb(40, 127, 0); background-color: inherit; "><a href=3D"../mo=
d/mpm_common.html#maxclients" style=3D"color: rgb(40, 127, 0); background-c=
olor: inherit; ">MaxClients</a></code>=C2=A0directive divided by the=C2=A0<=
code class=3D"directive" style=3D"font-family: 'Courier New', Couri=
er, monospace; font-size: 1em; color: rgb(40, 127, 0); background-color: in=
herit; "><a href=3D"../mod/mpm_common.html#
threadsperchild" style=3D"color: rgb(40, 127, 0); background-color: inh=
erit; ">ThreadsPerChild</a></code>=C2=A0directive.=C2=A0<code class=3D"dire=
ctive" style=3D"font-family: 'Courier New', Courier, monospace; fon=
t-size: 1em; color: rgb(40, 127, 0); background-color: inherit; "><a href=
=3D"../mod/mpm_common.html#threadlimit" style=3D"color: rgb(40, 127, 0); ba=
ckground-color: inherit; ">ThreadLimit</a></code>=C2=A0is a hard limit of t=
he number of server threads, and must be greater than or equal to the=C2=A0=
<code class=3D"directive" style=3D"font-family: 'Courier New', Cour=
ier, monospace; font-size: 1em; color: rgb(40, 127, 0); background-color: i=
nherit; "><a href=3D"../mod/mpm_common.html#threadsperchild" style=3D"color=
: rgb(40, 127, 0); background-color: inherit; ">ThreadsPerChild</a></code>=
=C2=A0directive.</span></div>
<div><span class=3D"Apple-style-span" style=3D"font-family: Arial, Helvetic=
a, sans-serif; font-size: 14px; color: rgb(0, 51, 102); line-height: 18px; =
"><br></span></div><div><font class=3D"Apple-style-span" face=3D"Arial, Hel=
vetica, sans-serif"><span class=3D"Apple-style-span" style=3D"line-height: =
18px;">I did like above on worker MPM but server reached Max connection whe=
n 256th connection come.</span></font></div>
<div><font class=3D"Apple-style-span" face=3D"Arial, Helvetica, sans-serif"=
><span class=3D"Apple-style-span" style=3D"line-height: 18px;"><br></span><=
/font></div><div><font class=3D"Apple-style-span" face=3D"Arial, Helvetica,=
sans-serif"><span class=3D"Apple-style-span" style=3D"line-height: 18px;">=
<div>
<IfModule mpm_worker_module></div><div>=C2=A0=C2=A0 =C2=A0StartServer=
s =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5</div><div>=C2=A0=C2=A0=
=C2=A0MaxClients =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0350</div>=
<div>=C2=A0=C2=A0 =C2=A0MinSpareThreads =C2=A0 =C2=A0 =C2=A0 25</div><div>=
=C2=A0=C2=A0 =C2=A0MaxSpareThreads =C2=A0 =C2=A0 =C2=A075</div><div>=C2=A0=
=C2=A0 =C2=A0ThreadsPerChild =C2=A0 =C2=A0 =C2=A0 =C2=A0 25</div>
<div>=C2=A0=C2=A0 =C2=A0MaxRequestsPerChild =C2=A0 0</div><div>=C2=A0=C2=A0=
=C2=A0ServerLimit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 40</div=
><div>=C2=A0=C2=A0 =C2=A0ThreadLimit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A040</div><div></IfModule></div><div><br></div></span></font>=
</div><div><font class=3D"Apple-style-span" face=3D"Arial, Helvetica, sans-=
serif"><span class=3D"Apple-style-span" style=3D"line-height: 18px;">Is the=
re something wrong in my configuration ?</span></font></div>
<div><font class=3D"Apple-style-span" face=3D"Arial, Helvetica, sans-serif"=
><span class=3D"Apple-style-span" style=3D"line-height: 18px;"><br></span><=
/font></div><div><font class=3D"Apple-style-span" face=3D"Arial, Helvetica,=
sans-serif"><span class=3D"Apple-style-span" style=3D"line-height: 18px;">=
Regards,</span></font></div>
<div><font class=3D"Apple-style-span" face=3D"Arial, Helvetica, sans-serif"=
><span class=3D"Apple-style-span" style=3D"line-height: 18px;">Tseveen.</sp=
an></font></div><div><font class=3D"Apple-style-span" face=3D"Arial, Helvet=
ica, sans-serif"><span class=3D"Apple-style-span" style=3D"line-height: 18p=
x;"><br>
</span></font></div>

--00504502f52d0673da047aad58ab--
Tseveendorj Ochirlant [ Mo, 14 Dezember 2009 11:00 ] [ ID #2025855 ]

Re: about ServerLimit and ThreadLimit

> On the documentation of Apache2.2
> ServerLimit=A0is a hard limit on the number of active child processes, an=
d
> must be greater than or equal to the=A0MaxClients=A0directive divided by
> the=A0ThreadsPerChild=A0directive.=A0ThreadLimit=A0is a hard limit of the=
number of
> server threads, and must be greater than or equal to
> the=A0ThreadsPerChild=A0directive.
> I did like above on worker MPM but server reached Max connection when 256=
th
> connection come.
> <IfModule mpm_worker_module>
> =A0=A0 =A0StartServers =A0 =A0 =A0 =A0 =A0 =A0 =A0 5
> =A0=A0 =A0MaxClients =A0 =A0 =A0 =A0 =A0 =A0 =A0350
> =A0=A0 =A0MinSpareThreads =A0 =A0 =A0 25
> =A0=A0 =A0MaxSpareThreads =A0 =A0 =A075
> =A0=A0 =A0ThreadsPerChild =A0 =A0 =A0 =A0 25
> =A0=A0 =A0MaxRequestsPerChild =A0 0
> =A0=A0 =A0ServerLimit =A0 =A0 =A0 =A0 =A0 =A0 =A0 40
> =A0=A0 =A0ThreadLimit =A0 =A0 =A0 =A0 =A0 =A0 =A040
> </IfModule>
> Is there something wrong in my configuration ?

My guess is that you're not using the worker MPM, and that you're
actually using the prefork MPM which is the default. Run a 'apachectl
-l' and see the modules you've got compiled-in. If you see 'prefork.c'
then that's why. See the docs for changing to worker if that's what
you want.

Cheers,
Phil.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Philip Wigg [ Mo, 14 Dezember 2009 11:23 ] [ ID #2025856 ]

Re: about ServerLimit and ThreadLimit

--0016e64ccb2acdff60047aae8c26
Content-Type: text/plain; charset=UTF-8

Philip Wigg,

You're right. Thank you very much. Solved

Regards,
Tseveen.

I got prefork.c. Can you drive me

On Mon, Dec 14, 2009 at 6:23 PM, Philip Wigg <phil [at] philipwigg.co.uk> wrote:

> > On the documentation of Apache2.2
> > ServerLimit is a hard limit on the number of active child processes, and
> > must be greater than or equal to the MaxClients directive divided by
> > the ThreadsPerChild directive. ThreadLimit is a hard limit of the number
> of
> > server threads, and must be greater than or equal to
> > the ThreadsPerChild directive.
> > I did like above on worker MPM but server reached Max connection when
> 256th
> > connection come.
> > <IfModule mpm_worker_module>
> > StartServers 5
> > MaxClients 350
> > MinSpareThreads 25
> > MaxSpareThreads 75
> > ThreadsPerChild 25
> > MaxRequestsPerChild 0
> > ServerLimit 40
> > ThreadLimit 40
> > </IfModule>
> > Is there something wrong in my configuration ?
>
> My guess is that you're not using the worker MPM, and that you're
> actually using the prefork MPM which is the default. Run a 'apachectl
> -l' and see the modules you've got compiled-in. If you see 'prefork.c'
> then that's why. See the docs for changing to worker if that's what
> you want.
>
> Cheers,
> Phil.
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
> For additional commands, e-mail: users-help [at] httpd.apache.org
>
>

--0016e64ccb2acdff60047aae8c26
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Philip Wigg,<div><br></div><div>You're right. Thank you very much. Solv=
ed</div><div><br></div><div>Regards,</div><div>Tseveen.</div><div><br></div=
><div>I got prefork.c. Can you drive me</div><div><br><div class=3D"gmail_q=
uote">
On Mon, Dec 14, 2009 at 6:23 PM, Philip Wigg <span dir=3D"ltr"><<a href=
=3D"mailto:phil [at] philipwigg.co.uk" target=3D"_blank">phil [at] philipwigg.co.uk</=
a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div><div></div><div>> On the documentati=
on of Apache2.2<br>
> ServerLimit=C2=A0is a hard limit on the number of active child process=
es, and<br>
> must be greater than or equal to the=C2=A0MaxClients=C2=A0directive di=
vided by<br>
> the=C2=A0ThreadsPerChild=C2=A0directive.=C2=A0ThreadLimit=C2 =A0is a ha=
rd limit of the number of<br>
> server threads, and must be greater than or equal to<br>
> the=C2=A0ThreadsPerChild=C2=A0directive.<br>
> I did like above on worker MPM but server reached Max connection when =
256th<br>
> connection come.<br>
> <IfModule mpm_worker_module><br>
> =C2=A0=C2=A0 =C2=A0StartServers =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 5<br>
> =C2=A0=C2=A0 =C2=A0MaxClients =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0350<br>
> =C2=A0=C2=A0 =C2=A0MinSpareThreads =C2=A0 =C2=A0 =C2=A0 25<br>
> =C2=A0=C2=A0 =C2=A0MaxSpareThreads =C2=A0 =C2=A0 =C2=A075<br>
> =C2=A0=C2=A0 =C2=A0ThreadsPerChild =C2=A0 =C2=A0 =C2=A0 =C2=A0 25<br>
> =C2=A0=C2=A0 =C2=A0MaxRequestsPerChild =C2=A0 0<br>
> =C2=A0=C2=A0 =C2=A0ServerLimit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 40<br>
> =C2=A0=C2=A0 =C2=A0ThreadLimit =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A040<br>
> </IfModule><br>
> Is there something wrong in my configuration ?<br>
<br>
</div></div>My guess is that you're not using the worker MPM, and that =
you're<br>
actually using the prefork MPM which is the default. Run a 'apachectl<b=
r>
-l' and see the modules you've got compiled-in. If you see 'pre=
fork.c'<br>
then that's why. See the docs for changing to worker if that's what=
<br>
you want.<br>
<br>
Cheers,<br>
Phil.<br>
<br>
------------------------------------------------------------ ---------<br>
The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL:<a href=3D"http://httpd.apache.org/userslist.html" target=3D"_b=
lank">http://httpd.apache.org/userslist.html</a>> for more info.<br>
To unsubscribe, e-mail: <a href=3D"mailto:users-unsubscribe [at] httpd.apache.or=
g" target=3D"_blank">users-unsubscribe [at] httpd.apache.org</a><br>
=C2=A0 " =C2=A0 from the digest: <a href=3D"mailto:users-digest-unsub=
scribe [at] httpd.apache.org" target=3D"_blank">users-digest-unsubscribe [at] httpd.a=
pache.org</a><br>
For additional commands, e-mail: <a href=3D"mailto:users-help [at] httpd.apache.=
org" target=3D"_blank">users-help [at] httpd.apache.org</a><br>
<br>
</blockquote></div><br></div>

--0016e64ccb2acdff60047aae8c26--
Tseveendorj Ochirlant [ Mo, 14 Dezember 2009 12:26 ] [ ID #2025857 ]

Re: about ServerLimit and ThreadLimit

> I got prefork.c. Can you drive me

I'm afraid I can't drive you, you'll have to read the documentation
about the process models. Here's a good start:-

http://httpd.apache.org/docs/2.2/mpm.html
http://httpd.apache.org/docs/2.2/mod/prefork.html

It might be that switching to the worker MPM is what you want, or you
might want to stay with prefork and just increase MaxClients but
you'll have to read about the MPMs and decide.

After reading the docs, if you have a specific issue you need help
with then feel free to come back with a suitably constructed smart
question and we'll be happy to help.

http://catb.org/~esr/faqs/smart-questions.html

Cheers,
Phil.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
" from the digest: users-digest-unsubscribe [at] httpd.apache.org
For additional commands, e-mail: users-help [at] httpd.apache.org
Philip Wigg [ Mo, 14 Dezember 2009 12:51 ] [ ID #2025858 ]

Re: about ServerLimit and ThreadLimit

--0016e64cba84f6eb19047ab9a796
Content-Type: text/plain; charset=UTF-8

Philip Wigg,

Sorry that was mistake. I didn't clear it :D
problem already solved. Have a nice day dude.

Best regards,
Tseveen.

On Mon, Dec 14, 2009 at 7:51 PM, Philip Wigg <phil [at] philipwigg.co.uk> wrote:

> > I got prefork.c. Can you drive me
>
> I'm afraid I can't drive you, you'll have to read the documentation
> about the process models. Here's a good start:-
>
> http://httpd.apache.org/docs/2.2/mpm.html
> http://httpd.apache.org/docs/2.2/mod/prefork.html
>
> It might be that switching to the worker MPM is what you want, or you
> might want to stay with prefork and just increase MaxClients but
> you'll have to read about the MPMs and decide.
>
> After reading the docs, if you have a specific issue you need help
> with then feel free to come back with a suitably constructed smart
> question and we'll be happy to help.
>
> http://catb.org/~esr/faqs/smart-questions.html
>
> Cheers,
> Phil.
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd.apache.org
> " from the digest: users-digest-unsubscribe [at] httpd.apache.org
> For additional commands, e-mail: users-help [at] httpd.apache.org
>
>

--0016e64cba84f6eb19047ab9a796
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Philip Wigg,<div><br></div><div>Sorry that was mistake. I didn't clear =
it :D</div><div>problem already solved. Have a nice day dude.</div><div><br=
></div><div>Best regards,</div><div>Tseveen.</div><div><br><div class=3D"gm=
ail_quote">
On Mon, Dec 14, 2009 at 7:51 PM, Philip Wigg <span dir=3D"ltr"><<a href=
=3D"mailto:phil [at] philipwigg.co.uk">phil [at] philipwigg.co.uk</a>></span> wrot=
e:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-l=
eft:1px #ccc solid;padding-left:1ex;">
<div class=3D"im">> I got prefork.c. Can you drive me<br>
<br>
</div>I'm afraid I can't drive you, you'll have to read the doc=
umentation<br>
about the process models. Here's a good start:-<br>
<br>
<a href=3D"http://httpd.apache.org/docs/2.2/mpm.html" target=3D"_blank">htt=
p://httpd.apache.org/docs/2.2/mpm.html</a><br>
<a href=3D"http://httpd.apache.org/docs/2.2/mod/prefork.html" target=3D"_bl=
ank">http://httpd.apache.org/docs/2.2/mod/prefork.html</a><br>
<br>
It might be that switching to the worker MPM is what you want, or you<br>
might want to stay with prefork and just increase MaxClients but<br>
you'll have to read about the MPMs and decide.<br>
<br>
After reading the docs, if you have a specific issue you need help<br>
with then feel free to come back with a suitably constructed smart<br>
question and we'll be happy to help.<br>
<br>
<a href=3D"http://catb.org/~esr/faqs/smart-questions.html" target=3D"_blank=
">http://catb.org/~esr/faqs/smart-questions.html</a><br>
<div><div></div><div class=3D"h5"><br>
Cheers,<br>
Phil.<br>
<br>
------------------------------------------------------------ ---------<br>
The official User-To-User support forum of the Apache HTTP Server Project.<=
br>
See <URL:<a href=3D"http://httpd.apache.org/userslist.html" target=3D"_b=
lank">http://httpd.apache.org/userslist.html</a>> for more info.<br>
To unsubscribe, e-mail: <a href=3D"mailto:users-unsubscribe [at] httpd.apache.or=
g">users-unsubscribe [at] httpd.apache.org</a><br>
=C2=A0 " =C2=A0 from the digest: <a href=3D"mailto:users-digest-unsub=
scribe [at] httpd.apache.org">users-digest-unsubscribe [at] httpd.apac he.org</a><br>
For additional commands, e-mail: <a href=3D"mailto:users-help [at] httpd.apache.=
org">users-help [at] httpd.apache.org</a><br>
<br>
</div></div></blockquote></div><br></div>

--0016e64cba84f6eb19047ab9a796--
Tseveendorj Ochirlant [ Di, 15 Dezember 2009 01:41 ] [ ID #2026080 ]
Webserver » gmane.comp.apache.user » about ServerLimit and ThreadLimit

Vorheriges Thema: Calculating settings for mpm-worker/mod_proxy_ajp/Tomcat
Nächstes Thema: Interesting error while using 2.2.11 on Solaris 9