Re: [users@httpd] 答复: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

2022-04-25 Thread Frank Gingras
The event mpm is not "unstable". You likely read legacy pages that alluded
to the fact that it's still experimental. It is not. The event mpm is the
recommended mpm for production; in fact, even the ASF itself uses it!

Where did you read that, exactly?

On Mon, 25 Apr 2022 at 05:25, 刘孟  wrote:

> Hi Frank Gingras
>
>
>
> I am sorry I missed this mail.
>
>
>
> I have got your advice and gone to study event mpm.
>
> I had study worker mpm before and very concerned about its
>
> instability in processing large volume servers and the interaction between
> threads.
>
> I don’t know if event mpm can avoid this problems but I will study it.
>
> Thank you for you advice again
>
>
>
> Best regards
>
>
>
>
> ---
>
> 刘孟 Liu Meng
>
> Project Development Dept.
>
> Tel : 010 82306399-7526 /Phone : 18500386112
>
>
>
> 北京図迅豊達信息技術有限公司 北京市海淀区北清路永豊路交差点東南 四維図新ビルA-8F
>
> Address : 8Floor,A Block,NavInfo Building, Southeast Crossing of BeiQing
> Rd. and YongFeng Rd., HaiDian District, Beijing(100094)
>
>
> -----------------------
>
>
>
> *发件人:* Frank Gingras 
> *发送时间:* 2022年4月16日 2:45
> *收件人:* users@httpd.apache.org
> *主题:* Re: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild
> problem
>
>
>
> Aside from the useful tuning tips, I would also caution against using
> prefork for high-volume servers. The event mpm would scale better.
>
>
>
> On Fri, 15 Apr 2022 at 09:55, Yann Ylavic  wrote:
>
> On Fri, Apr 15, 2022 at 3:50 PM Yann Ylavic  wrote:
> >
> > On Fri, Apr 15, 2022 at 2:16 PM 刘孟  wrote:
> > >
> > >
> > > What I want to ask is, will these 1000 sub processes fail at the same
> time,
> > > causing my httpd serivce to stop responding.But I think you have given
> the answer
> > > >because the clients connections themselves will not have the same
> > > >lifetime (including keep-alive in between requests). In my opinion
> the risk is negligible.
> > >
> > > I think setting MaxConnectionsPerChild will lead to a slight decrease
> in the processing capacity of my server,
> > > but the possibility that all processes failed at the same time can be
> ignored.. Is my understanding correct
> >
> > Yes, and I don't think there will be a noticeable capacity change if
> > you don't set MaxConnectionsPerChild too low (the right tuning depends
> > on the number of connections per second).
> >
> > >
> > > in this way, the restart action usually occurs in the busiest period
> of the server in daytime,
> > > so I think your advice of using cron is a good suggestion. Of course,
> in order to prevent all httped services from
> > > stopping at the same time, I think I should set cron for the servers
> at different times. Is that I am in the right way?
> >
> > Yes, and ideally your DNS switches do not happen at the load peak, so
> > there should be too much processes restarted when the cron executes.
>
> "there should *not* be"
>
> >
> > >
> > > I also thank you for your suggestions on max/minspareservers. The
> adjustment of them will also be in my plan.
> > > > you probably should raise it to something more close to
> MaxRequestWorkers for efficiency.
> > >
> > > Do you mean I should adjust it to a daily peak of about 1000?
> >
> > Yes, that way at the load peak you have the full capacity of
> > processes, and after the peak they should be killed by
> > MaxConnectionsPerChild at some point (without being restarted) hence
> > move towards MinSpareservers, until the next peak..
> > So you should find the MaxConnectionsPerChild setting that does kill
>
> "that does *not* kill"
>
> > processes too often at load peak but still kills enough processes
> > after the peak (during the ramp down).
> >
> >
> > Regards;
> > Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


[users@httpd] 答复: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

2022-04-25 Thread 刘孟
Hi Frank Gingras

I am sorry I missed this mail.

I have got your advice and gone to study event mpm.
I had study worker mpm before and very concerned about its
instability in processing large volume servers and the interaction between 
threads.
I don’t know if event mpm can avoid this problems but I will study it.
Thank you for you advice again

Best regards

---
刘孟 Liu Meng
Project Development Dept.
Tel : 010 82306399-7526 /Phone : 18500386112

北京図迅豊達信息技術有限公司  北京市海淀区北清路永豊路交差点東南 四維図新ビルA-8F
Address : 8Floor,A Block,NavInfo Building, Southeast Crossing of BeiQing Rd. 
and YongFeng Rd., HaiDian District, Beijing(100094)
---

发件人: Frank Gingras 
发送时间: 2022年4月16日 2:45
收件人: users@httpd.apache.org
主题: Re: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

Aside from the useful tuning tips, I would also caution against using prefork 
for high-volume servers. The event mpm would scale better.

On Fri, 15 Apr 2022 at 09:55, Yann Ylavic 
mailto:ylavic@gmail.com>> wrote:
On Fri, Apr 15, 2022 at 3:50 PM Yann Ylavic 
mailto:ylavic@gmail.com>> wrote:
>
> On Fri, Apr 15, 2022 at 2:16 PM 刘孟 
> mailto:lium...@telemap.com.cn>> wrote:
> >
> >
> > What I want to ask is, will these 1000 sub processes fail at the same time,
> > causing my httpd serivce to stop responding.But I think you have given the 
> > answer
> > >because the clients connections themselves will not have the same
> > >lifetime (including keep-alive in between requests). In my opinion the 
> > >risk is negligible.
> >
> > I think setting MaxConnectionsPerChild will lead to a slight decrease in 
> > the processing capacity of my server,
> > but the possibility that all processes failed at the same time can be 
> > ignored.. Is my understanding correct
>
> Yes, and I don't think there will be a noticeable capacity change if
> you don't set MaxConnectionsPerChild too low (the right tuning depends
> on the number of connections per second).
>
> >
> > in this way, the restart action usually occurs in the busiest period of the 
> > server in daytime,
> > so I think your advice of using cron is a good suggestion. Of course, in 
> > order to prevent all httped services from
> > stopping at the same time, I think I should set cron for the servers at 
> > different times. Is that I am in the right way?
>
> Yes, and ideally your DNS switches do not happen at the load peak, so
> there should be too much processes restarted when the cron executes.

"there should *not* be"

>
> >
> > I also thank you for your suggestions on max/minspareservers. The 
> > adjustment of them will also be in my plan.
> > > you probably should raise it to something more close to MaxRequestWorkers 
> > > for efficiency.
> >
> > Do you mean I should adjust it to a daily peak of about 1000?
>
> Yes, that way at the load peak you have the full capacity of
> processes, and after the peak they should be killed by
> MaxConnectionsPerChild at some point (without being restarted) hence
> move towards MinSpareservers, until the next peak..
> So you should find the MaxConnectionsPerChild setting that does kill

"that does *not* kill"

> processes too often at load peak but still kills enough processes
> after the peak (during the ramp down).
>
>
> Regards;
> Yann.

-
To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org<mailto:users-unsubscr...@httpd.apache.org>
For additional commands, e-mail: 
users-h...@httpd.apache.org<mailto:users-h...@httpd.apache.org>


[users@httpd] 答复: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

2022-04-19 Thread 刘孟
HI, Yann

Thank you for your reply and advices.
I will try to tunning servers with your advices.

It's my first time to vist this community and very glad to
meet you who can bear my poor English.
Thank you very much again.

Best regards.

---
刘孟 Liu Meng
Project Development Dept.
Tel : 010 82306399-7526 /Phone : 18500386112

北京図迅豊達信息技術有限公司  北京市海淀区北清路永豊路交差点東南 四維図新ビルA-8F
Address : 8Floor,A Block,NavInfo Building, Southeast Crossing of BeiQing Rd. 
and YongFeng Rd., HaiDian District, Beijing(100094) 
---


-邮件原件-
发件人: Yann Ylavic  
发送时间: 2022年4月15日 21:51
收件人: users@httpd.apache.org
主题: Re: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

On Fri, Apr 15, 2022 at 2:16 PM 刘孟  wrote:
>
>
> What I want to ask is, will these 1000 sub processes fail at the same 
> time, causing my httpd serivce to stop responding.But I think you have 
> given the answer
> >because the clients connections themselves will not have the same 
> >lifetime (including keep-alive in between requests). In my opinion the risk 
> >is negligible.
>
> I think setting MaxConnectionsPerChild will lead to a slight decrease 
> in the processing capacity of my server, but the possibility that all 
> processes failed at the same time can be ignored.. Is my understanding 
> correct

Yes, and I don't think there will be a noticeable capacity change if you don't 
set MaxConnectionsPerChild too low (the right tuning depends on the number of 
connections per second).

>
> in this way, the restart action usually occurs in the busiest period 
> of the server in daytime, so I think your advice of using cron is a 
> good suggestion. Of course, in order to prevent all httped services from 
> stopping at the same time, I think I should set cron for the servers at 
> different times. Is that I am in the right way?

Yes, and ideally your DNS switches do not happen at the load peak, so there 
should be too much processes restarted when the cron executes.

>
> I also thank you for your suggestions on max/minspareservers. The adjustment 
> of them will also be in my plan.
> > you probably should raise it to something more close to MaxRequestWorkers 
> > for efficiency.
>
> Do you mean I should adjust it to a daily peak of about 1000?

Yes, that way at the load peak you have the full capacity of processes, and 
after the peak they should be killed by MaxConnectionsPerChild at some point 
(without being restarted) hence move towards MinSpareservers, until the next 
peak..
So you should find the MaxConnectionsPerChild setting that does kill processes 
too often at load peak but still kills enough processes after the peak (during 
the ramp down).


Regards;
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

2022-04-15 Thread Frank Gingras
Aside from the useful tuning tips, I would also caution against using
prefork for high-volume servers. The event mpm would scale better.

On Fri, 15 Apr 2022 at 09:55, Yann Ylavic  wrote:

> On Fri, Apr 15, 2022 at 3:50 PM Yann Ylavic  wrote:
> >
> > On Fri, Apr 15, 2022 at 2:16 PM 刘孟  wrote:
> > >
> > >
> > > What I want to ask is, will these 1000 sub processes fail at the same
> time,
> > > causing my httpd serivce to stop responding.But I think you have given
> the answer
> > > >because the clients connections themselves will not have the same
> > > >lifetime (including keep-alive in between requests). In my opinion
> the risk is negligible.
> > >
> > > I think setting MaxConnectionsPerChild will lead to a slight decrease
> in the processing capacity of my server,
> > > but the possibility that all processes failed at the same time can be
> ignored.. Is my understanding correct
> >
> > Yes, and I don't think there will be a noticeable capacity change if
> > you don't set MaxConnectionsPerChild too low (the right tuning depends
> > on the number of connections per second).
> >
> > >
> > > in this way, the restart action usually occurs in the busiest period
> of the server in daytime,
> > > so I think your advice of using cron is a good suggestion. Of course,
> in order to prevent all httped services from
> > > stopping at the same time, I think I should set cron for the servers
> at different times. Is that I am in the right way?
> >
> > Yes, and ideally your DNS switches do not happen at the load peak, so
> > there should be too much processes restarted when the cron executes.
>
> "there should *not* be"
>
> >
> > >
> > > I also thank you for your suggestions on max/minspareservers. The
> adjustment of them will also be in my plan.
> > > > you probably should raise it to something more close to
> MaxRequestWorkers for efficiency.
> > >
> > > Do you mean I should adjust it to a daily peak of about 1000?
> >
> > Yes, that way at the load peak you have the full capacity of
> > processes, and after the peak they should be killed by
> > MaxConnectionsPerChild at some point (without being restarted) hence
> > move towards MinSpareservers, until the next peak..
> > So you should find the MaxConnectionsPerChild setting that does kill
>
> "that does *not* kill"
>
> > processes too often at load peak but still kills enough processes
> > after the peak (during the ramp down).
> >
> >
> > Regards;
> > Yann.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
> For additional commands, e-mail: users-h...@httpd.apache.org
>
>


Re: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

2022-04-15 Thread Yann Ylavic
On Fri, Apr 15, 2022 at 3:50 PM Yann Ylavic  wrote:
>
> On Fri, Apr 15, 2022 at 2:16 PM 刘孟  wrote:
> >
> >
> > What I want to ask is, will these 1000 sub processes fail at the same time,
> > causing my httpd serivce to stop responding.But I think you have given the 
> > answer
> > >because the clients connections themselves will not have the same
> > >lifetime (including keep-alive in between requests). In my opinion the 
> > >risk is negligible.
> >
> > I think setting MaxConnectionsPerChild will lead to a slight decrease in 
> > the processing capacity of my server,
> > but the possibility that all processes failed at the same time can be 
> > ignored.. Is my understanding correct
>
> Yes, and I don't think there will be a noticeable capacity change if
> you don't set MaxConnectionsPerChild too low (the right tuning depends
> on the number of connections per second).
>
> >
> > in this way, the restart action usually occurs in the busiest period of the 
> > server in daytime,
> > so I think your advice of using cron is a good suggestion. Of course, in 
> > order to prevent all httped services from
> > stopping at the same time, I think I should set cron for the servers at 
> > different times. Is that I am in the right way?
>
> Yes, and ideally your DNS switches do not happen at the load peak, so
> there should be too much processes restarted when the cron executes.

"there should *not* be"

>
> >
> > I also thank you for your suggestions on max/minspareservers. The 
> > adjustment of them will also be in my plan.
> > > you probably should raise it to something more close to MaxRequestWorkers 
> > > for efficiency.
> >
> > Do you mean I should adjust it to a daily peak of about 1000?
>
> Yes, that way at the load peak you have the full capacity of
> processes, and after the peak they should be killed by
> MaxConnectionsPerChild at some point (without being restarted) hence
> move towards MinSpareservers, until the next peak..
> So you should find the MaxConnectionsPerChild setting that does kill

"that does *not* kill"

> processes too often at load peak but still kills enough processes
> after the peak (during the ramp down).
>
>
> Regards;
> Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



Re: [users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

2022-04-15 Thread Yann Ylavic
On Fri, Apr 15, 2022 at 2:16 PM 刘孟  wrote:
>
>
> What I want to ask is, will these 1000 sub processes fail at the same time,
> causing my httpd serivce to stop responding.But I think you have given the 
> answer
> >because the clients connections themselves will not have the same
> >lifetime (including keep-alive in between requests). In my opinion the risk 
> >is negligible.
>
> I think setting MaxConnectionsPerChild will lead to a slight decrease in the 
> processing capacity of my server,
> but the possibility that all processes failed at the same time can be 
> ignored.. Is my understanding correct

Yes, and I don't think there will be a noticeable capacity change if
you don't set MaxConnectionsPerChild too low (the right tuning depends
on the number of connections per second).

>
> in this way, the restart action usually occurs in the busiest period of the 
> server in daytime,
> so I think your advice of using cron is a good suggestion. Of course, in 
> order to prevent all httped services from
> stopping at the same time, I think I should set cron for the servers at 
> different times. Is that I am in the right way?

Yes, and ideally your DNS switches do not happen at the load peak, so
there should be too much processes restarted when the cron executes.

>
> I also thank you for your suggestions on max/minspareservers. The adjustment 
> of them will also be in my plan.
> > you probably should raise it to something more close to MaxRequestWorkers 
> > for efficiency.
>
> Do you mean I should adjust it to a daily peak of about 1000?

Yes, that way at the load peak you have the full capacity of
processes, and after the peak they should be killed by
MaxConnectionsPerChild at some point (without being restarted) hence
move towards MinSpareservers, until the next peak..
So you should find the MaxConnectionsPerChild setting that does kill
processes too often at load peak but still kills enough processes
after the peak (during the ramp down).


Regards;
Yann.

-
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org



[users@httpd] 答复: [users@httpd] [apache]maxconnectionsperchild problem

2022-04-15 Thread 刘孟
Hello,Mr Yann Ylavic



Thank you for your advice.



What I want to ask is, will these 1000 sub processes fail at the same time,

causing my httpd serivce to stop responding.But I think you have given the 
answer

>because the clients connections themselves will not have the same

>lifetime (including keep-alive in between requests). In my opinion the risk is 
>negligible.



I think setting MaxConnectionsPerChild will lead to a slight decrease in the 
processing capacity of my server,

but the possibility that all processes failed at the same time can be ignored.. 
Is my understanding correct



in this way, the restart action usually occurs in the busiest period of the 
server in daytime,

so I think your advice of using cron is a good suggestion. Of course, in order 
to prevent all httped services from

stopping at the same time, I think I should set cron for the servers at 
different times. Is that I am in the right way?



I also thank you for your suggestions on max/minspareservers. The adjustment of 
them will also be in my plan.

> you probably should raise it to something more close to MaxRequestWorkers for 
> efficiency.

Do you mean I should adjust it to a daily peak of about 1000?



Thanks for you reply again.



Best regards.

Meng



---

刘孟 Liu Meng

Project Development Dept.

Tel : 010 82306399-7526 /Phone : 18500386112



北京図迅豊達信息技術有限公司  北京市海淀区北清路永豊路交差点東南 四維図新ビルA-8F

Address : 8Floor,A Block,NavInfo Building, Southeast Crossing of BeiQing Rd. 
and YongFeng Rd., HaiDian District, Beijing(100094)

---





-邮件原件-
发件人: Yann Ylavic 
发送时间: 2022年4月15日 19:07
收件人: users@httpd.apache.org
主题: Re: [users@httpd] [apache]maxconnectionsperchild problem



Hello,



On Fri, Apr 15, 2022 at 7:39 AM 刘孟 
mailto:lium...@telemap.com.cn>> wrote:

>

> During the peak hours of the company's internal servers, the number of

> sub processes(hpptd) of each server is about

> 1000,[Maxconnectionsperchild] is currently set to 0. In order to be

> able to resolve the  access target regularlyIn DNS, we plan to adjust the 
> value of [maxconnectionsperchild] to make each child process in half a day 
> that It can be restarted once.

>

> My question is After setting this parameter, if it is possible that

> 1000 processes are arrive at the same time resulting in service interruption?



I suppose that you worry about 1000 processes restarting at the same time hence 
all issuing DNS requests (which could disrupt the DNS service)?

If so it is very unlikely that MaxConnectionsPerChild triggers at the same time 
on all the children processes because the clients connections themselves will 
not have the same lifetime (including keep-alive in between requests). In my 
opinion the risk is negligible.



>

> Current server setting of [maxsparechlid = 20] and  [minspareechlid =

> 10] If [maxconnectionsperchild] is set, should the settings of these

> two values be adjusted synchronously



(I suppose you are referring to MaxSpareServers and MinSpareServers here)



If the peak is around 1000 connections then MaxSpareServers 20 is probably to 
low, if the load fluctuates a little httpd will keep stopping and recreating 
the processes all the peak time (there are 980 processes above the limit from 
its point of vue..).

I don't think MaxSpareServers is a good fit for your goal of restarting 
processes at least twice a day anyway, you probably should raise it to 
something more close to MaxRequestWorkers for efficiency.

While MaxConnectionsPerChild can help in lowering/restoring the number of 
processes after the peak, it's not ideal either for restarting processes in 
synchronization with your DNS because there can still be processes that are 
restarted just before the DNS have switched and they will not work until 
MaxConnectionsPerChild have failed..



Did you think of a cron job (or a trigger) that explicitely restart httpd 
(gracefuly) just after the DNS have switched?





Regards;

Yann.



-

To unsubscribe, e-mail: 
users-unsubscr...@httpd.apache.org

For additional commands, e-mail: 
users-h...@httpd.apache.org