Hi Nigel,

Thanks for your prompt reply.
Can you please help me in clarifying some of my doubts?

1.       What is the significance of setting MaxConnectionsPerChild to a value 
between 1-100 ?

2.       What are the possible reasons for not setting MaxConnectionsPerChild 
to a high value, greater than 100 ?

Thanks & Regards
Arnav Garg

From: Nigel B. Peck [mailto:[email protected]]
Sent: Wednesday, August 21, 2019 11:51 AM
To: [email protected]
Subject: Re: [users@httpd] Apache process crashes, utilizing high memory

On Mon, 19 Aug 2019 at 11:24 pm, Arnav Garg 
<[email protected]<mailto:[email protected]>> wrote:
Hi All,


I have an apache web server(v2.4) + ckan (v2.7.2) running in a docker container.
In our scenario, CKAN is being hit with large number of requests at certain 
intervals (like 10 requests/sec). Then after a certain period of time, the 
memory consumption tends to increase towards it's threshold value.

After a certain interval/time, if we access the home page of ckan at 
https://url-address/ckan with large number of request(Using Jmeter), the memory 
usage of the Apache process keeps on increasing and ultimately the process 
crashes and does not work properly.

As a quick remedy for this, restarting the docker container reduces the memory 
usage.

My concern is that, are there any set of conditions/parameters in Apache 
Webserver that needs to be taken care of to prevent this behavior. for eg: 
MaxConnectionPerChild or any other Parameter? Or is there any way to limit the 
memory consumption of Apache web server?

Some of the values set in apache2.conf are:

1.       Timeout 300

2.       KeepAlive On

3.       MaxKeepAliveRequests 100

4.       KeepAliveTimeout 5

Also /apache2/mods-enabled/mpm_event.conf consists of the following parameters 
and values:

1.       StartServers                     2

2.       MinSpareThreads           25

3.       MaxSpareThreads          75

4.       ThreadLimit                     64

5.       ThreadsPerChild             25

6.       MaxRequestWorkers     150

7.       MaxConnectionsPerChild   0

Thanks & Regards
Arnav Garg

Setting MaxConnectionsPerChild to something not too high (100 as a temporary 
fix?) should avoid you needing to restart your Docker container, sounds like 
you probably have a memory leak in your application that needs fixing.

Nigel B. Peck

Web Technologies and Linux Server Admin Mentor
https://codementor.io/nigelbpeck



________________________________
The contents of this e-mail and any attachment(s) are confidential and intended 
for the named recipient(s) only. It shall not attach any liability on the 
originator or NECTI or its affiliates. Any views or opinions presented in this 
email are solely those of the author and may not necessarily reflect the 
opinions of NECTI or its affiliates. Any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and / or publication of this 
message without the prior written consent of the author of this e-mail is 
strictly prohibited. If you have received this email in error please delete it 
and notify the sender immediately.

Reply via email to