Keep alive

2011-03-31 Thread Joan Balaguero
Hello Oleg, I’ve implemented a Connection Keep Alive strategy in my app, but I’m not able to see what is the better way to check if it’s working ok. Could you give any clue about how to do this? Thanks, Joan.

Keep alive

2014-03-13 Thread Joan Balagueró
Hello, After migrating to 4.3 from 4.1, I don’t get keep-alive connections working. My code is: (…) if (this.vkas == null) this.vkas = new KeepAliveStrategy(keepAliveDuration); else this.vkas.setKeepAliveDuration(keepAliveDuration); (...) HttpClientBuilder hcBuilder

Keep-Alive

2016-06-06 Thread Rallavagu
HttpClient 4.3.2, JDK 7 I was doing something similar to what is talked in this link related to http commons client 3.x http://httpcomponents.10934.n7.nabble.com/quot-Keep-alive-quot-stale-connections-and-socket-reuse-td15315.html I am using PoolingHttpClientConnectionManager with following

Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-11 Thread Baratali Izmailov
Hello, I have http request that takes too much time to be processed by the server (about 5 minutes). Because connection becomes idle for 5 minutes, proxy server shutdowns the connection. I'm trying to use TCP Keep-Alive in Apache DefaultHttpClient to make connection be alive for a long time

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-11 Thread Dan Quaroni
that takes too much time to be processed by the server > (about 5 minutes). Because connection becomes idle for 5 minutes, proxy > server shutdowns the connection. I'm trying to use TCP Keep-Alive in Apache > DefaultHttpClient to make connection be alive for a long time (Not confuse >

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-11 Thread Oleg Kalnichevski
On Wed, 2016-05-11 at 15:52 +0100, Baratali Izmailov wrote: > Hello, > > I have http request that takes too much time to be processed by the server > (about 5 minutes). Because connection becomes idle for 5 minutes, proxy > server shutdowns the connection. I'm trying to u

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-11 Thread ecki
-idle. An alternative would be to send 0-byte HTTP (content transfer) chunks from the server. Gruss Bernd -- http://bernd.eckenfels.net -Original Message- From: Oleg Kalnichevski To: HttpClient User Discussion Sent: Mi., 11 Mai 2016 18:46 Subject: Re: Apache HttpClient TCP Keep-Alive

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-12 Thread Baratali Izmailov
keepalive wont help you with default OS settings, it would not start to send them in the first 20 idle minutes. Can I configure Apache httpd server to do this (set keep-alive timeouts)? Thanks, Baratali.

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-12 Thread Oleg Kalnichevski
> start to send them in the first 20 idle minutes. > Can I configure Apache httpd server to do this (set keep-alive timeouts)? > > Thanks, > Baratali. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-12 Thread Baratali Izmailov
t; > DefaultHttpClient. > > > > Please consider upgrading. I am not entirely sure if HC 4.2 supports TCP > keepalive setting. > > Oleg > > > > Using TCP keepalive wont help you with default OS settings, it would > not >

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-12 Thread Oleg Kalnichevski
fairly > > > old. > > > It is 4.2.2. Actually I use Spring 3.2.1 httpInvoker which uses > > > DefaultHttpClient. > > > > > > > Please consider upgrading. I am not entirely sure if HC 4.2 supports TCP > > keepalive setting. > > > &g

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-18 Thread Baratali Izmailov
sing? It looks like something > > > fairly > > > > old. > > > > It is 4.2.2. Actually I use Spring 3.2.1 httpInvoker which uses > > > > DefaultHttpClient. > > > > > > > > > > Please consider upgrading. I am not entirely sure i

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-18 Thread ecki
help to keep a connection open if an intermediate wants to be an annoyance. Greetings Bernd -- http://bernd.eckenfels.net -Original Message- From: Baratali Izmailov To: HttpClient User Discussion Sent: Mi., 18 Mai 2016 12:37 Subject: Re: Apache HttpClient TCP Keep-Alive (socket keep

Re: Apache HttpClient TCP Keep-Alive (socket keep-alive)

2016-05-19 Thread Baratali Izmailov
ort to configure the keepalive times, they only allow to turn it on. Yes. As I know the only way to set those timeouts is configuring Linux parameters. By default keep-alive timeout is 2 hours which is too long :) Some explanations: http://stackoverflow.com/questions/1480236/does-a-tcp-socket-connec

Keep alive questions

2010-06-16 Thread Joan Balaguero
Hello, I have three questions abut keeupAlive: 1. If “getKeepAliveDuration” returns 0, that means: a. No keep alive OR b. Keep connections alive indefinitely. 2. If I want to remove the keep alive strategy, what should I do? Call “http.setKeepAliveStrategy(null

Re: Keep alive

2011-03-31 Thread Sam Crawford
e same TCP connection is being re-used. Thanks, Sam On 31 March 2011 17:12, Joan Balaguero wrote: > Hello Oleg, > > > > I’ve implemented a Connection Keep Alive strategy in my app, but I’m not > able to see what is the better way to check if it’s working ok. Could you > giv

RE: Keep alive

2011-03-31 Thread Vadheraju, Rajeshwar
Hi Joan, I'm also researching on the same area. Could you please provide some details why you are implementing keep alive strategy? In other words, What problems prompted you to implement keep alive strategy? If you could elaborate on your issue, I could share some of my experience and res

RE: Keep alive

2011-03-31 Thread Joan Balaguero
Hello, Thanks, it seems to work. Keep-Alive = 10 seconds. First request (creates new connection) Get connection: HttpRoute[{}->http://10.20.30.105:80], timeout = 1 [HttpRoute[{}->http://10.20.30.105:80]] kept alive: 0, issued: 0, allocated: 0 out of 500 No free connections [HttpRoute[{}

RE: Keep alive

2011-03-31 Thread Joan Balaguero
connection problems. Regards, Joan. -Mensaje original- De: Vadheraju, Rajeshwar [mailto:rajeshwar.vadher...@fisglobal.com] Enviado el: jueves, 31 de marzo de 2011 18:19 Para: HttpClient User Discussion Asunto: RE: Keep alive Hi Joan, I'm also researching on the same area. Could you please p

RE: Keep alive

2011-03-31 Thread Vadheraju, Rajeshwar
Yes, agreed. I think it is good idea to implement "retry" and "idle connection handler" as opposed to "keep alive strategy". How did you implement or use idle connection thread? I am using xfire as my soap framework which uses MultiThreadedConnectionManager internal

Re: Keep alive

2011-04-01 Thread Gurmeet Budhraja
You can use IdleConnectionTimeoutThread for the same :) On Fri, Apr 1, 2011 at 12:41 AM, Vadheraju, Rajeshwar < rajeshwar.vadher...@fisglobal.com> wrote: > Yes, agreed. I think it is good idea to implement "retry" and "idle > connection handler" as opposed to

RE: Keep alive

2011-04-01 Thread Vadheraju, Rajeshwar
: HttpClient User Discussion Subject: Re: Keep alive You can use IdleConnectionTimeoutThread for the same :) On Fri, Apr 1, 2011 at 12:41 AM, Vadheraju, Rajeshwar < rajeshwar.vadher...@fisglobal.com> wrote: > Yes, agreed. I think it is good idea to implement "retry" and "idle

RE: Keep alive

2014-03-13 Thread Joan Balagueró
Hello, Forget it ... Thanks. Joan. -Mensaje original- De: Joan Balagueró [mailto:joan.balagu...@grupoventus.com] Enviado el: jueves, 13 de marzo de 2014 19:23 Para: httpclient-users@hc.apache.org Asunto: Keep alive Hello, After migrating to 4.3 from 4.1, I don’t get keep-alive

Re: Keep-Alive

2016-06-07 Thread Oleg Kalnichevski
On Mon, 2016-06-06 at 13:43 -0700, Rallavagu wrote: > HttpClient 4.3.2, JDK 7 > > I was doing something similar to what is talked in this link related to > http commons client 3.x > > http://httpcomponents.10934.n7.nabble.com/quot-Keep-alive-quot-stale-connections-and-socket-

Re: Keep-Alive

2016-06-13 Thread Rallavagu
On 6/7/16 6:13 AM, Oleg Kalnichevski wrote: On Mon, 2016-06-06 at 13:43 -0700, Rallavagu wrote: HttpClient 4.3.2, JDK 7 I was doing something similar to what is talked in this link related to http commons client 3.x http://httpcomponents.10934.n7.nabble.com/quot-Keep-alive-quot-stale

Re: Keep-Alive

2016-06-13 Thread Oleg Kalnichevski
related to > >> http commons client 3.x > >> > >> http://httpcomponents.10934.n7.nabble.com/quot-Keep-alive-quot-stale-connections-and-socket-reuse-td15315.html > >> > >> I am using PoolingHttpClientConnectionManager with following SocketConfi

Re: Keep-Alive

2016-06-13 Thread Rallavagu
http commons client 3.x http://httpcomponents.10934.n7.nabble.com/quot-Keep-alive-quot-stale-connections-and-socket-reuse-td15315.html I am using PoolingHttpClientConnectionManager with following SocketConfig. SocketConfig socketConfig = SocketConfig.copy(SocketConfig.DEFAULT).setSoKeepAlive

Re: Keep-Alive

2016-06-13 Thread Rallavagu
to what is talked in this link related to http commons client 3.x http://httpcomponents.10934.n7.nabble.com/quot-Keep-alive-quot-stale-connections-and-socket-reuse-td15315.html I am using PoolingHttpClientConnectionManager with following SocketConfig. SocketConfig socketConfig = SocketConfig.copy

Re: Keep alive questions

2010-06-18 Thread Oleg Kalnichevski
On Wed, 2010-06-16 at 17:55 +0200, Joan Balaguero wrote: > Hello, > > > > I have three questions abut keeupAlive: > > > > > > 1. If “getKeepAliveDuration” returns 0, that means: > > a. No keep alive > OR > b. Keep connections alive

RE: Keep alive questions

2010-06-18 Thread Joan Balaguero
Hello Oleg, Thanks for your response. What I mean by removing keep alive strategy is the following. I have an administration application with the following option: [x] Keep alive http connection for [ ] seconds. If the user checks this option, he must enter a number greather than 0 as

RE: Keep alive questions

2010-06-18 Thread Oleg Kalnichevski
On Fri, 2010-06-18 at 12:51 +0200, Joan Balaguero wrote: > Hello Oleg, > > Thanks for your response. > > What I mean by removing keep alive strategy is the following. I have an > administration application with the following option: > > [x] Keep alive http connect

RE: Keep alive questions

2010-06-18 Thread Joan Balaguero
Ok, then my 'getKeepAliveDuration' method should do: 1. If the user enters a 'keepAliveDuration' (> 0) --> return this value. 2. If the user does not check 'keep-alive', then: 2.1. if 'keep-alive' header exists --> return its value. 2.2.

RE: Keep alive questions

2010-06-18 Thread Oleg Kalnichevski
On Fri, 2010-06-18 at 13:53 +0200, Joan Balaguero wrote: > Ok, then my 'getKeepAliveDuration' method should do: > > 1. If the user enters a 'keepAliveDuration' (> 0) --> return this value. > 2. If the user does not check 'keep-alive', then: >

"Keep-alive", stale connections and socket reuse

2008-08-28 Thread Dobri Kitipov
Hi, I am trying to explain myself how the "keep-alive", or TCP connection persistence, is supposed to work? I have read several resources about that, but I still have some questions ( http://java.sun.com/j2se/1.5.0/docs/guide/net/http-keepalive.html http://hc.apache.org/http

Re: "Keep-alive", stale connections and socket reuse

2008-08-29 Thread Oleg Kalnichevski
On Thu, 2008-08-28 at 14:51 +0300, Dobri Kitipov wrote: > Hi, > > I am trying to explain myself how the "keep-alive", or TCP connection > persistence, is supposed to work? I have read several resources about that, > but I still have some questions ( > http://java.sun.c

Re: "Keep-alive", stale connections and socket reuse

2008-09-01 Thread Dobri Kitipov
TED]> wrote: > On Thu, 2008-08-28 at 14:51 +0300, Dobri Kitipov wrote: > > Hi, > > > > I am trying to explain myself how the "keep-alive", or TCP connection > > persistence, is supposed to work? I have read several resources about > that, > > but I stil

Re: "Keep-alive", stale connections and socket reuse

2008-09-01 Thread Dobri Kitipov
OTECTED]>wrote: > >> On Thu, 2008-08-28 at 14:51 +0300, Dobri Kitipov wrote: >> > Hi, >> > >> > I am trying to explain myself how the "keep-alive", or TCP connection >> > persistence, is supposed to work? I have read several resources about &

Re: "Keep-alive", stale connections and socket reuse

2008-09-02 Thread Oleg Kalnichevski
On Mon, 2008-09-01 at 17:27 +0300, Dobri Kitipov wrote: > Hi Oleg, > I have one additional more abstract question. What I have observed during my > tests was that when I run my test scenarion with 5 WS consecutive > invocations and sniff the traffic I can see that the sockets were reused. > The pro

Re: "Keep-alive", stale connections and socket reuse

2008-09-02 Thread Oleg Kalnichevski
On Mon, 2008-09-01 at 16:33 +0300, Dobri Kitipov wrote: > Hi Oleg, > thank you for the detailed answer of my question. > It seems we need to recommend the Axis2 guys to use the better version. Do > you know when there will be an official release of HttpClient 4.0-beta1? > > Thank you, > Dobri >

Re: "Keep-alive", stale connections and socket reuse

2008-09-02 Thread Dobri Kitipov
Thank you for the answers! Regards, Dobri On Tue, Sep 2, 2008 at 9:20 PM, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote: > On Mon, 2008-09-01 at 17:27 +0300, Dobri Kitipov wrote: > > Hi Oleg, > > I have one additional more abstract question. What I have observed during > my > > tests was that when

Why client connection's port changed always when server support Keep-alive?

2008-12-22 Thread alin(王霖)
>http://192.168.208.110]][null] 17:33:33,065 DEBUG ConnPoolByRoute:394 - Pooling connection [HttpRoute[{}-> http://192.168.208.110]][null]; keep alive for 15000 MILLISECONDS Who can tell me why this is? -- best Regards alin

Issue with Proxy / keep alive , getting NoHttpResponseException after a failed request

2018-12-18 Thread Philippe Mouawad
ost target = new HttpHost("jmeter.apache.org"); HttpPost request = new HttpPost("/404.html"); request.addHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); request.addHeader("Connection", "keep-ali

Re: Why client connection's port changed always when server support Keep-alive?

2008-12-23 Thread Oleg Kalnichevski
eClientConnManager:221 - Released connection is > reusable. > 17:33:33,065 DEBUG ConnPoolByRoute:374 - Releasing connection > [HttpRoute[{}->http://192.168.208.110]][null] > 17:33:33,065 DEBUG ConnPoolByRoute:394 - Pooling connection [HttpRoute[{}-> > http://192.168.208.110]][nu

Re: Why client connection's port changed always when server support Keep-alive?

2008-12-23 Thread alin(王霖)
:33:33,065 DEBUG ConnPoolByRoute:374 - Releasing connection > > [HttpRoute[{}->http://192.168.208.110]][null] > > 17:33:33,065 DEBUG ConnPoolByRoute:394 - Pooling connection > [HttpRoute[{}-> > > http://192.168.208.110]][null]; keep alive for 15000 MILLISECONDS > > >

Re: Why client connection's port changed always when server support Keep-alive?

2008-12-24 Thread Oleg Kalnichevski
> for 15000 ms > > > 17:33:33,065 DEBUG ThreadSafeClientConnManager:221 - Released connection > > is > > > reusable. > > > 17:33:33,065 DEBUG ConnPoolByRoute:374 - Releasing connection > > > [HttpRoute[{}->http://192.168.208.

Re: Why client connection's port changed always when server support Keep-alive?

2008-12-24 Thread alin(王霖)
;> Content-Length: 188 10:27:29,853 DEBUG headers:254 - >> Content-Type: application/x-www-form-urlencoded 10:27:29,853 DEBUG headers:254 - >> Host: 192.168.208.110 10:27:29,853 DEBUG headers:254 - >> Connection: Keep-Alive 10:27:29,853 DEBUG wire:78 - >> "fields=name

Re: Why client connection's port changed always when server support Keep-alive?

2008-12-25 Thread Oleg Kalnichevski
:27:29,822 DEBUG RequestAddCookies:125 - CookieSpec selected: best-match > 10:27:29,838 DEBUG DefaultRequestDirector:408 - Attempt 1 to execute request > 10:27:29,838 DEBUG wire:78 - >> "POST /router/rest HTTP/1.1[EOL]" > 10:27:29,853 DEBUG wire:78 - >> "Content-Leng

Does HttpClient v3 handle Keep-Alive properly ? (code analysis and description inside)

2010-06-15 Thread Laurent Perez
Hello I'm trying to understand if the v3, which my application currently uses, handles Keep-Alive properly - because our client says it does not. On several requests, using lsof, I can see that httpclient connections in state ESTABLISHED gradually fall back to a CLOSE_WAIT state, and they

Re: Issue with Proxy / keep alive , getting NoHttpResponseException after a failed request

2018-12-18 Thread Oleg Kalnichevski
HttpRequestRetryHandler(0, > false)). > > setConnectionReuseStrategy(DefaultClientConnectionReuseStrategy.INSTA > NCE). > build()) { > HttpHost target = new HttpHost("jmeter.apache.org"); > HttpPost request = new HttpPost("

Re: Issue with Proxy / keep alive , getting NoHttpResponseException after a failed request

2018-12-18 Thread Philippe Mouawad
; > setConnectionTimeToLive(2000, TimeUnit.MILLISECONDS). > > setRetryHandler(new > > StandardHttpRequestRetryHandler(0, > > false)). > > > > setConnectionReuseStrategy(DefaultClientConnectionReuseStrategy.INSTA > > NCE). &g

Re: Does HttpClient v3 handle Keep-Alive properly ? (code analysis and description inside)

2010-06-15 Thread Oleg Kalnichevski
On Tue, 2010-06-15 at 18:37 +0200, Laurent Perez wrote: > Hello > > I'm trying to understand if the v3, which my application currently > uses, handles Keep-Alive properly - because our client says it does > not. > Even if it is a paying client, your client still i

Re: Does HttpClient v3 handle Keep-Alive properly ? (code analysis and description inside)

2010-06-15 Thread miguel
On Tue, 15 Jun 2010 18:37:48 +0200, Laurent Perez wrote: > Hello > > I'm trying to understand if the v3, which my application currently > uses, handles Keep-Alive properly - because our client says it does > not. > > On several requests, using lsof, I can see that h

HttpServer on shutdown waits for entire grace period when client is connected using keep-alive

2020-08-09 Thread Niklas Lochschmidt
)` respectively. Here is what I am seeing: - When the server has never been requested it shuts down instantly ✔️ - When the server has been requested by a client without keep-alive it shuts down instantly ✔️ - When the server has been requested by a client with keep-alive and the request is in-flight

Re: HttpServer on shutdown waits for entire grace period when client is connected using keep-alive

2020-08-09 Thread Oleg Kalnichevski
ng > down with `shutdown(5, TimeUnit.SECONDS)` and > `close(CloseMode.GRACEFUL)` respectively. Here is what I am seeing: > > - When the server has never been requested it shuts down instantly > ✔️ > - When the server has been requested by a client without keep-alive > it &g

Re: HttpServer on shutdown waits for entire grace period when client is connected using keep-alive

2020-08-09 Thread Niklas Lochschmidt
e()` and > > shutting > > down with `shutdown(5, TimeUnit.SECONDS)` and > > `close(CloseMode.GRACEFUL)` respectively. Here is what I am seeing: > > > > - When the server has never been requested it shuts down instantly > > ✔️ > > - When the server has been r

Re: HttpServer on shutdown waits for entire grace period when client is connected using keep-alive

2020-08-10 Thread Oleg Kalnichevski
hat I am > > seeing: > > > > > > - When the server has never been requested it shuts down > > instantly > > > ✔️ > > > - When the server has been requested by a client without keep- > > alive > > > it > > > shuts down instantly ✔️ &g