AWS InterruptedException: sleep interrupted com.amazonaws.http.IdleConnectionReaper

房东的猫 提交于 2021-02-09 20:41:20

问题


we have a web application use AWS (Amazone api), in the coreConfiguration class we create a awsApi bean with predestroy method, the code for coreConfiguration is:

@Bean(destroyMethod = "destroy")
    public IGridStorageManager awsApi() {
.....
}

in awsApi class we have detroy methode, the code is:

@Override
    @PreDestroy
    public void destroy() {
        if (clientS3 != null) {
            clientS3.shutdown();
        }
    }

My problem is sometime in PROD when i use the API i see thos logs:

2020-08-03 11:27:00.090 DEBUG 25172 --- [java-sdk-http-connection-reaper] com.amazonaws.http.IdleConnectionReaper : Reaper thread:
java.lang.InterruptedException: sleep interrupted
        at java.lang.Thread.sleep(Native Method)
        at com.amazonaws.http.IdleConnectionReaper.run(IdleConnectionReaper.java:188)

I read that this exception can cause memory leak, i found that we need to use a shutdown() method, the problem is i aleardy use @preadestory method with shutdown method, why i have those exceptions ?

Can you help me ?

Thanks

来源:https://stackoverflow.com/questions/63242758/aws-interruptedexception-sleep-interrupted-com-amazonaws-http-idleconnectionrea

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!