Skip to content

Conversation

@zx-zheng
Copy link
Contributor

I encountered the following exception.
S3Object opened in getS3ObjectAndMetadata() should be closed to avoid this exception.

2016-03-10 15:55:14:077 50 sec: 49 operations; 0 current ops/sec; est completion in 16 minutes [UPDATE: Count=0, Max=0, Min=9223372036854775807, Avg=, 90=0, 99=0, 99.9=0, 99.99=0] 
Mar 10, 2016 3:55:23 PM com.amazonaws.http.AmazonHttpClient executeHelper
INFO: Unable to execute HTTP request: Timeout waiting for connection from pool
org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
        at org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:226)
        at org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:195)
        at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at com.amazonaws.http.conn.ClientConnectionRequestFactory$Handler.invoke(ClientConnectionRequestFactory.java:70)
        at com.amazonaws.http.conn.$Proxy4.getConnection(Unknown Source)
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:423)
        at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
        at com.amazonaws.http.AmazonHttpClient.executeOneRequest(AmazonHttpClient.java:728)
        at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:489)
        at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:310)
        at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:3604)
        at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:999)
        at com.yahoo.ycsb.db.S3Client.getS3ObjectAndMetadata(S3Client.java:462)
        at com.yahoo.ycsb.db.S3Client.writeToStorage(S3Client.java:354)
        at com.yahoo.ycsb.db.S3Client.update(S3Client.java:301)
        at com.yahoo.ycsb.DBWrapper.update(DBWrapper.java:186)
        at com.yahoo.ycsb.workloads.CoreWorkload.doTransactionUpdate(CoreWorkload.java:788)
        at com.yahoo.ycsb.workloads.CoreWorkload.doTransaction(CoreWorkload.java:621)
        at com.yahoo.ycsb.ClientThread.run(Client.java:329)

S3Object opened in getS3ObjectAndMetadata() should be closed.
@busbey
Copy link
Collaborator

busbey commented Mar 21, 2016

The S3Object returned from getS3ObjectAndMetadata in readFromStorage should also get closed, I think?

@zx-zheng
Copy link
Contributor Author

@busbey Although unclosed S3object in readFromStorage does not cause the exception, it should be closed too. I fixed.

@busbey
Copy link
Collaborator

busbey commented Mar 22, 2016

could you ensure the most recent commit has a message that starts with "[S3]"?

@zx-zheng zx-zheng force-pushed the s3_close_s3object branch from 3bcad1c to 912a956 Compare March 22, 2016 04:24
@zx-zheng
Copy link
Contributor Author

The commit message starts with "[S3]" now.

busbey added a commit that referenced this pull request Mar 22, 2016
@busbey busbey merged commit f25f26f into brianfrankcooper:master Mar 22, 2016
@busbey
Copy link
Collaborator

busbey commented Mar 22, 2016

thanks!

@cmatser cmatser mentioned this pull request Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants