hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nir Dweck <n...@vasco-de.com>
Subject Re: Socket leak of Async HTTP server
Date Tue, 18 Dec 2012 07:55:08 GMT
Oleg,
Thanks for the response.
The code doesn't compile because i didn't add my logic classes. In any case
I think I found the problem and it has nothing to do with the HTTPCore. My
application is a GW to a system and someone "forgot" that he run a new
process that accidentally sometimes stuck the system which affected my GW,
he just "remembered' it this morning. I have a stand alone test which
worked fine all the time, which was the reason I was so puzzled by the
problem and asked the forum if anyone has run into such a problem.
Regards,
Nir


On Sun, Dec 16, 2012 at 6:01 PM, Oleg Kalnichevski <olegk@apache.org> wrote:

> On Sun, 2012-12-16 at 13:03 +0200, Nir Dweck wrote:
> > Hi,
> > I am new to HTTP Components. I wrote a short server which is based on the
> > Asynchronous HTTP Server example. I am using httpcore-4.2.2 and
> > httpcore-nio-4.2.2. I wrote a short test program that loads my server. I
> > see that after ~500,000 requests I get a socket leak of ~600 sockets. I
> got
> > 84 SocketTimeoutException during the test. After I got to a big number of
> > leak sockets the application stopped responding and I couldn't even
> connect
> > to it with remote debugger.
> > bellow is my test.
> > Regards,
> > Nir
>
> Nir
>
> Your code does not compile so I cannot test it. I know that HttpCore
> (both blocking and non-blocking) can easily handle millions of requests.
> There is an (non-scientific) HTTP micro-benchmark used by the project to
> test HttpCore's performance [1]. Based on it 1'000'000 request do not
> seem to pose any sort of issue.
>
> Feel free to tweak the micro-benchmark and see how it performs for you
>
> Oleg
>
> [1]
> http://svn.apache.org/repos/asf/httpcomponents/benchmark/httpcore/trunk/
>
> ---------------------------------------------------------------
> HttpCore (blocking I/O); version: 4.2.3
> ---------------------------------------------------------------
>
> Server Software:                HttpCore-Test/1.1
> Server Hostname:                localhost
> Server Port:                    8989
>
> Document Path:                  http://localhost:8989/rnd?c=2048
> Document Length:                2048 bytes
>
> Concurrency Level:              10
> Time taken for tests:           9.889423 seconds
> Complete requests:              1000000
> Failed requests:                0
> Write errors:                   0
> Kept alive:                     1000000
> Total transferred:              2048000000 bytes
> Requests per second:            101,118.13 [#/sec] (mean)
> Time per request:               0.099 [ms] (mean)
> Time per request:               0.010 [ms] (mean, across all concurrent
> requests)
> Transfer rate:                  207,089.94 [Kbytes/sec] received
>                                 -1 kb/s sent
>                                 207,089.94 kb/s total
> ---------------------------------------------------------------
> ---------------------------------------------------------------
> HttpCore (NIO); version: 4.2.3
> ---------------------------------------------------------------
>
> Server Software:                HttpCore-NIO-Test/1.1
> Server Hostname:                localhost
> Server Port:                    8989
>
> Document Path:                  http://localhost:8989/rnd?c=2048
> Document Length:                2048 bytes
>
> Concurrency Level:              10
> Time taken for tests:           20.235072 seconds
> Complete requests:              1000000
> Failed requests:                0
> Write errors:                   0
> Kept alive:                     1000000
> Total transferred:              2048000000 bytes
> Requests per second:            49,419.15 [#/sec] (mean)
> Time per request:               0.202 [ms] (mean)
> Time per request:               0.020 [ms] (mean, across all concurrent
> requests)
> Transfer rate:                  101,210.41 [Kbytes/sec] received
>                                 -1 kb/s sent
>                                 101,210.41 kb/s total
> ---------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message