You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2020/02/12 12:19:01 UTC

[GitHub] [httpcomponents-client] h0nIg opened a new pull request #210: re-add validateAfterInactivity to pool manager

h0nIg opened a new pull request #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210
 
 
   It is really ugly that this setting was removed. This default value is responsible for checking bad connections and people will not notice this change if they upgrade, because it will not happen very frequently: https://github.com/apache/httpcomponents-client/blob/rel/v4.5.9/httpclient/src/main/java/org/apache/http/impl/conn/PoolingHttpClientConnectionManager.java#L182

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] h0nIg edited a comment on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
h0nIg edited a comment on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585754127
 
 
   @ok2c ok after looking at the code it is still not clear for me why you said it is inefficient. or it is not really clear for me what it really does
   
   https://github.com/apache/httpcomponents-core/blob/529b392b63229e1a4e658b1105332adaf3a89464/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/BHttpConnectionBase.java#L297
   
   it sets a read timeout of 1 and it tries to read from an empty socket which was in the queue and should not have any further input content which can be streamed. if the check can not read data, the connection is expected to be stale??
   
   what is the code really doing?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585759167
 
 
   @h0nIg The stale check is ineffective because the connection can go stale immediately after having passed the check. It can catch some stale connections but not all. It is also inefficient by being expensive in therms of execution overhead.   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-586875937
 
 
   > @ok2c ok after looking at the code it is still not clear for me why you said it is inefficient. 
   
   @h0nIg Because in reality socket timeout granularity of many JREs is about 10 ms or more. Therefore the stale connection check adds ~10 ms to each request execution time when activated.  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] h0nIg edited a comment on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
h0nIg edited a comment on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585677241
 
 
   @ok2c "if configured properly". In 4.X it was enabled by default and in 5.X it is not enabled by default, therefore please enable it by default in 5.X as well or help me to understand why its no longer like in 4.X

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c edited a comment on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c edited a comment on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585759167
 
 
   @h0nIg The stale check is ineffective because the connection can go stale immediately after having passed the check. It can catch some stale connections but not all. It is also inefficient by being expensive in terms of execution overhead.   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585605763
 
 
   @ok2c because the stale check will not get triggered if this value is empty. In 4.X it will get triggered and i don't see any reason why this should change: https://github.com/apache/httpcomponents-client/blob/bd22d7cf24f262fcbf5040ac50e262d1ca1b9974/httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/PoolingHttpClientConnectionManager.java#L291-L308

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585611409
 
 
   @h0nIg The check _will_ get triggered if configured correctly. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585677241
 
 
   @h0nIg "if configured properly". In 4.X it was enabled by default and in 5.X it is not enabled by default, therefore please enable it by default in 5.X as well or help me to understand why its no longer like in 4.X

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585754127
 
 
   @ok2c ok, can you elaborate about "ineffective and inefficient" to better understand what is not catched by the check?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585219463
 
 
   @h0nIg Why? What is exactly the benefit of calling that method in the constructor?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c closed pull request #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c closed pull request #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
h0nIg commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585598359
 
 
   @ok2c to restore the original 4.x behaviour as outlined in my comment. Please take a look at the links how it looked before

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585601313
 
 
   > @ok2c to restore the original 4.x behaviour as outlined in my comment. Please take a look at the links how it looked before
   
   @h0nIg And why would we do that exactly?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


[GitHub] [httpcomponents-client] ok2c commented on issue #210: re-add validateAfterInactivity to pool manager

Posted by GitBox <gi...@apache.org>.
ok2c commented on issue #210: re-add validateAfterInactivity to pool manager
URL: https://github.com/apache/httpcomponents-client/pull/210#issuecomment-585732292
 
 
   @h0nIg The stale connection check is both ineffective and inefficient. A major release is the point when its application can be changed from having to opt-out to having to opt-in.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org