Singleton ReflectionSocketFactory will not be usable once some exception happens
--------------------------------------------------------------------------------

                 Key: HTTPCLIENT-817
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-817
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 3.1 Final
         Environment: Tomcat 6.0 with jdk1.6 on linux redhat 2.5

            Reporter: Yuan Wang
             Fix For: 3.1.1


Our environment uses httpclient-3.x to implement a connection pool between 
servers. However, we experienced an problem when some extreme cases happened.

When our server has very high traffice, the tomcat on the linux box will maxed 
out its file descriptors. 
At this moment, the org.apache.commons.httpclient.protocol.createSocket will 
fail due to the following problem:

The org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket 
and throws exception (it's a java.net.UnknownHostException) and the flag 
REFLECTION_FAILED will be set to true. After this point, the 
ReflectionSocketFactory will never be usable even when the system resources get 
back to normal. Due to this problem, a conner issue of the tomcat classloader 
will be triggered and our system will not be able to server any new request 
unless restart.

Proposed fix is to check the ReflectionSocketFactory.REFLECTION_FAILED, once 
it's set to false, it should not be unusable forever.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to