how to upgrade httpcore-nio plugin of wso2 api manager

35 views Asked by At

I am testing wso2 api manager 4.0.0. Periodically I am receiving an alert of high cpu utilization. After analyzing the thread usage I found out that SSLIOSession class was the root cause of the problem. Googling the problem led me to this issue.

After the HTTPS response is written back to the client, the server tries to close the connection and the SSLIOSession. Prior to JDK 8 261 versions (& Prior to Oracle JDK 11.0.2), after SSLIOSession closes the outBound connection, the Handshake status is returned as NEED_UNWRAP. When such status is returned, we set the new event Mask as Read EventMask. In the new JDK versions it is returned as NOT_HANDSHAKING. In such cases, the SSLSession is not getting closed properly, and the server is constantly trying to close the connection which causes the CPU spike.

That's why I am trying to upgrade httpcore-nio plugin from version 4.4.14 to 4.4.16. so that it works as expected. What I have done so far was build and put the jar file with new version (4.4.16) into the patch folder. But when I start the api manager it's stuck.

Any navigation or tip is appreciated.

1

There are 1 answers

2
ycr On

This is not recommended. The recommended approach is to migrate to the latest version.

But if you still want to patch it, checkout the 4.4.14 tag, then apply the fix, then build the source and apply it as a patch.