ecyuan opened a new issue #6280:
URL: https://github.com/apache/skywalking/issues/6280


   **Bug detail:**
   
   
org.apache.skywalking.oap.server.core.alarm.provider.dingtalk.DingtalkHookCallback
 -152207495 [pool-3-thread-1] ERROR [] - send dingtalk alarm to 
https://oapi.dingtalk.com/robot/send?access_token=xxx failure.
   org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for 
connection from pool
           at 
org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:314)
 ~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:280)
 ~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:190) 
~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) 
~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) 
~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) 
~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
 ~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
 ~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
 ~[httpclient-4.5.7.jar:4.5.7]
           at 
org.apache.skywalking.oap.server.core.alarm.provider.dingtalk.DingtalkHookCallback.sendAlarmMessage(DingtalkHookCallback.java:144)
 [server-alarm-plugin-8.2.0.jar:8.2.0]
           at 
org.apache.skywalking.oap.server.core.alarm.provider.dingtalk.DingtalkHookCallback.lambda$null$0(DingtalkHookCallback.java:88)
 [server-alarm-plugin-8.2.0.jar:8.2.0]
           at java.util.ArrayList.forEach(ArrayList.java:1541) [?:?]
           at 
org.apache.skywalking.oap.server.core.alarm.provider.dingtalk.DingtalkHookCallback.lambda$doAlarm$1(DingtalkHookCallback.java:83)
 [server-alarm-plugin-8.2.0.jar:8.2.0]
           at java.util.ArrayList.forEach(ArrayList.java:1541) [?:?]
           at 
org.apache.skywalking.oap.server.core.alarm.provider.dingtalk.DingtalkHookCallback.doAlarm(DingtalkHookCallback.java:82)
 [server-alarm-plugin-8.2.0.jar:8.2.0]
           at 
org.apache.skywalking.oap.server.core.alarm.provider.AlarmCore.lambda$null$3(AlarmCore.java:84)
 [server-alarm-plugin-8.2.0.jar:8.2.0]
           at java.util.ArrayList.forEach(ArrayList.java:1541) [?:?]
           at 
org.apache.skywalking.oap.server.core.alarm.provider.AlarmCore.lambda$start$4(AlarmCore.java:84)
 [server-alarm-plugin-8.2.0.jar:8.2.0]
           at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
           at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) 
[?:?]
   
   
   **Reason:**
   Forgot to close http response resource. Following file line:
   
https://github.com/apache/skywalking/blob/master/oap-server/server-alarm-plugin/src/main/java/org/apache/skywalking/oap/server/core/alarm/provider/dingtalk/DingtalkHookCallback.java#L144
   
   The "httpResponse" must be close to release the connection, otherwise it 
will hold the connection resource. When the numbers of connection over the 
default overhead, next request will throw ConnectionPoolTimeoutException.
   
   All other webhook callback have the same problem.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to