httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o haya <>
Subject Re: [users@httpd] Getting "connection refused" Apache 2.4
Date Mon, 16 Nov 2015 23:23:51 GMT
Just as a kind of slightly-different sanity check, I did some testing on an Apache 2.2.31
instance that I built awhile ago on one of my test CENTOS machines:
Server version: Apache/2.2.31 (Unix)Server built:   Oct  7 2015 11:32:17Server's Module
Magic Number: 20051115:40Server loaded:  APR 1.5.2, APR-Util 1.5.4Compiled using: APR 1.5.2,
APR-Util 1.5.4Architecture:   64-bitServer MPM:     Prefork  threaded:     no    forked:
    yes (variable process count)Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D
SUEXEC_BIN="/apps/httpd/bin/suexec" -D DEFAULT_PIDLOG="logs/" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D
DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D
Then, I ran essentially the same load test that I had been running earlier, and, I get similar
errors, e.g., connection refused.
This is with the as-built Apache configuration settings (i.e., I haven't tried tweaking them).
This is kind of leading me to think that it may the Apache, built with the above MPM model,
may just not be able to sustain this kind of load error-free? 
      From: o haya <>
 To: "" <> 
Cc: O. Haya <> 
 Sent: Monday, November 16, 2015 3:44 PM
 Subject: Re: [users@httpd] Getting "connection refused" Apache 2.4
Hi Daniel,
Unfortunately, the Apache I'm working with is part of a product, so I won't be able to change
to a different MPM type.
I've been trying what you suggested (increasing MinSpareServers) but I still get tons of connections
refused, even when I can confirm that, for example, I get 500+ httpd instances at startup
(e.g., ps -ef shows 500 instances).  Is it possible that something else (e.g., the Redhat
OS itself) is limiting the number of connections?


     From: Daniel <>
 To:; o haya <> 
 Sent: Monday, November 16, 2015 3:07 PM
 Subject: Re: [users@httpd] Getting "connection refused" Apache 2.4
migrate to worker or event...if you have to stick with prefork mpm, increase the number of
MinSpareServers to a very high number, prefork is very slow spawning new children since it
is not threaded, so better spawn most when apache starts.

El lun., 16 nov. 2015 a las 20:58, o haya (<>) escribió:


I am trying to do some load testing of Apache 2.4 on Redhat.

Configuration displayed when I run "httpd -V" shows:

Server MPM: prefork
threaded: no
forked: yes (variable process count)

I am using Jmeter to test, and when I increase the number of simultaneous threads to >
200, I am seeing increasing number of errors, with a lot of "connection refused" errors, e.g.:

org.apache.http.conn.HttpHostConnectException: Connection to refused
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(
        at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(
        at org.apache.http.impl.client.DefaultRequestDirector.execute(
        at org.apache.http.impl.client.AbstractHttpClient.execute(
        at org.apache.http.impl.client.AbstractHttpClient.execute(
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(
        at org.apache.jmeter.threads.JMeterThread.process_sampler(
        at Source)
Caused by: Connection timed out: connect
        at Method)
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at Source)
        at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(
        ... 14 more

I've been trying to re-configure the Apache to avoid these errors, e.g., increasing "MaxClients",
and I've also increased the amount of memory for the machine (to 4GB) but so far, nothing
I have done has improved the situation.

Is there something else that I can do to try to get the Apache so that it can accept the larger
number of connections?


To unsubscribe, e-mail:
For additional commands, e-mail:


View raw message