You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Alf Høgemark (JIRA)" <ji...@apache.org> on 2012/09/25 18:38:08 UTC

[jira] [Created] (HTTPCLIENT-1236) Change exception message when timeout getting connection from pool

Alf Høgemark created HTTPCLIENT-1236:
----------------------------------------

             Summary: Change exception message when timeout getting connection from pool
                 Key: HTTPCLIENT-1236
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1236
             Project: HttpComponents HttpClient
          Issue Type: Improvement
          Components: HttpClient
            Reporter: Alf Høgemark
            Priority: Minor


I experienced a situation where the connection pool could not open any more connections, and then I got a timeout exception. My server logs only displayed the exception message, so I only saw :
"Timeout waiting for connection".
Because there were also some slight network problems, I originally believed that the exception was caused by the "Connection timeout period" set on the http connection had passed, and that the server I tried to reach had not accepted the connection quickly enough.

But later on I figured out it was the connection pool.

So I suggest to change the exception message from :
"Timeout waiting for connection"
to
"Timeout waiting for connection from pool"

to make it clear that it is a pool timeout and not a network connect timeout.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Resolved] (HTTPCLIENT-1236) Change exception message when timeout getting connection from pool

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1236.
-------------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.2.2

Patch checked in. Many thanks, Alf, for contributing it.

Oleg
                
> Change exception message when timeout getting connection from pool
> ------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1236
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1236
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>            Reporter: Alf Høgemark
>            Priority: Minor
>             Fix For: 4.2.2
>
>         Attachments: 1236.txt
>
>
> I experienced a situation where the connection pool could not open any more connections, and then I got a timeout exception. My server logs only displayed the exception message, so I only saw :
> "Timeout waiting for connection".
> Because there were also some slight network problems, I originally believed that the exception was caused by the "Connection timeout period" set on the http connection had passed, and that the server I tried to reach had not accepted the connection quickly enough.
> But later on I figured out it was the connection pool.
> So I suggest to change the exception message from :
> "Timeout waiting for connection"
> to
> "Timeout waiting for connection from pool"
> to make it clear that it is a pool timeout and not a network connect timeout.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Updated] (HTTPCLIENT-1236) Change exception message when timeout getting connection from pool

Posted by "Alf Høgemark (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alf Høgemark updated HTTPCLIENT-1236:
-------------------------------------

    Attachment: 1236.txt

Suggested patch, changing the text for the exception
                
> Change exception message when timeout getting connection from pool
> ------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1236
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1236
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>            Reporter: Alf Høgemark
>            Priority: Minor
>         Attachments: 1236.txt
>
>
> I experienced a situation where the connection pool could not open any more connections, and then I got a timeout exception. My server logs only displayed the exception message, so I only saw :
> "Timeout waiting for connection".
> Because there were also some slight network problems, I originally believed that the exception was caused by the "Connection timeout period" set on the http connection had passed, and that the server I tried to reach had not accepted the connection quickly enough.
> But later on I figured out it was the connection pool.
> So I suggest to change the exception message from :
> "Timeout waiting for connection"
> to
> "Timeout waiting for connection from pool"
> to make it clear that it is a pool timeout and not a network connect timeout.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


[jira] [Commented] (HTTPCLIENT-1236) Change exception message when timeout getting connection from pool

Posted by "Alf Høgemark (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462936#comment-13462936 ] 

Alf Høgemark commented on HTTPCLIENT-1236:
------------------------------------------

If the suggested patch for httpclient is accepted, then you will probably also want to change the following in http code :
Index: httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java
===================================================================
--- httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java	(revision 1389964)
+++ httpcore/src/main/java/org/apache/http/pool/AbstractConnPool.java	(working copy)
@@ -283,7 +283,7 @@
                     break;
                 }
             }
-            throw new TimeoutException("Timeout waiting for connection");
+            throw new TimeoutException("Timeout waiting for connection from pool");
         } finally {
             this.lock.unlock();
         }

                
> Change exception message when timeout getting connection from pool
> ------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1236
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1236
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>            Reporter: Alf Høgemark
>            Priority: Minor
>         Attachments: 1236.txt
>
>
> I experienced a situation where the connection pool could not open any more connections, and then I got a timeout exception. My server logs only displayed the exception message, so I only saw :
> "Timeout waiting for connection".
> Because there were also some slight network problems, I originally believed that the exception was caused by the "Connection timeout period" set on the http connection had passed, and that the server I tried to reach had not accepted the connection quickly enough.
> But later on I figured out it was the connection pool.
> So I suggest to change the exception message from :
> "Timeout waiting for connection"
> to
> "Timeout waiting for connection from pool"
> to make it clear that it is a pool timeout and not a network connect timeout.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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