LeninGovi created HTTPASYNC-38:
----------------------------------

             Summary: Too many file open in httpclient
                 Key: HTTPASYNC-38
                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-38
             Project: HttpComponents HttpAsyncClient
          Issue Type: Bug
            Reporter: LeninGovi


I have written a thread program which is running one minute once to get 
document from couchDB database  using httpclient 4.2.3 ,it is working for some 
time after that giving exception as "Too many file open"

This is my code :

PoolingClientConnectionManager connectionManager = new 
PoolingClientConnectionManager();
                HttpClient httpclient = new 
DefaultHttpClient(connectionManager);
                HttpGet get = new 
HttpGet("http://10.163.29.105:5984/crl_archive1/_design/DataView/_view/viewAll";);
                try{
                        HttpResponse response = httpclient.execute(get);
                BufferedReader reader = new BufferedReader(new 
InputStreamReader(response.getEntity().getContent()));
try{       
        while( (strdata =reader.readLine())!=null)
        {     
           output+=strdata;
        }
        }catch (Exception e) {
                e.printStackTrace();
        }
}}catch (Exception e) {
                System.out.println("Error:"+e.getMessage());
                e.printStackTrace();
                log.error(e.getMessage());
                }
try{
                        Thread.sleep("60000");
get.releaseConnection();
                        get.abort();
                        connectionManager.closeExpiredConnections();
                        Fetch();        
                }catch (InterruptedException ie) {
                        Thread.currentThread().interrupt();
                        log.error(ie.getMessage());
                }
i am closing connection eventhough, it is still same error coming,
what would be the problem,

Please Help me

Thanks in advance

Regards
G.Lenin

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to