Re: Getting "connection refused" Apache 2.4

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

 



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 (<ohaya@xxxxxxxxx.invalid>) escribió:
Hi,

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 http://10.0.3.10:80 refused
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
        at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
        at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:107)
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:517)
        at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:331)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
        at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
        at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
        ... 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?

Thanks,
Jim



---------------------------------------------------------------------
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