You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by aRaviNd <am...@gmail.com> on 2017/01/30 12:34:56 UTC

[users@httpd] Apache connection limit

Hi All,

I am using Apache as a forward cache proxy and configured with prefork
module using below settings.

<IfModule mpm_prefork_module>
    StartServers        200
    MinSpareServers     50
    MaxSpareServers     100
    ServerLimit         1000
    MaxRequestWorkers   1000
    MaxConnectionsPerChild      1000
</IfModule>

Ulimit is configured with

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 63470
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 2048
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 63470
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Kernel settings is configured as

net.core.rmem_max = 4194304
net.core.wmem_max = 4194304
net.ipv4.tcp_rmem = 4096 65536 4194304
net.ipv4.tcp_wmem = 4096 65536 4194304

net.core.somaxconn = 4096
net.ipv4.tcp_fin_timeout = 10
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_window_scaling = 1

But no of concurrent connections is not increasing above 250. Please let me
know why connection count is not increasing 250 with above configuration.

Thank You

- Aravind

Re: [users@httpd] Apache connection limit

Posted by Luca Toscano <to...@gmail.com>.
Hi!

2017-01-30 13:34 GMT+01:00 aRaviNd <am...@gmail.com>:

> Hi All,
>
> I am using Apache as a forward cache proxy and configured with prefork
> module using below settings.
>
> <IfModule mpm_prefork_module>
>     StartServers        200
>     MinSpareServers     50
>     MaxSpareServers     100
>     ServerLimit         1000
>     MaxRequestWorkers   1000
>     MaxConnectionsPerChild      1000
> </IfModule>
>
> But no of concurrent connections is not increasing above 250. Please let
> me know why connection count is not increasing 250 with above configuration.
>
>
Some questions that might help since afaics the configuration should allow
to pass the 250 limit:

- How did you measure the 250 limit? Have you load tested the server?
- Are you sure that you are not hitting a limit in your proxied backend?
- Have you checked the Scoreboard in mod_status when the limit is reached?
What are the statues of the workers?
- Is there anything in the httpd error log that might indicate a
configuration issue?

One thing that looks odd is the low MaxConnectionsPerChild, it might
trigger a lot of Graceful children kills under high traffic.

Hope that helps!

Luca