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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

 

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

Address : 8Floor,A Block,NavInfo Building, Southeast Crossing of BeiQing Rd. and YongFeng Rd., HaiDian District, Beijing100094

-------------------------------------------------------------------------------------------

 

 

-----邮件原件-----
发件人: Yann Ylavic <ylavic.dev@xxxxxxxxx>
发送时间: 2022415 19:07
收件人: users@xxxxxxxxxxxxxxxx
主题: Re: [users@httpd] [apache]maxconnectionsperchild problem

 

Hello,

 

On Fri, Apr 15, 2022 at 7:39 AM 刘孟 <liumeng@xxxxxxxxxxxxxx> 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-unsubscribe@xxxxxxxxxxxxxxxx

For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx

 


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux