You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Riak java client (2.0.4) for our jax-rs services and I've encountered permgen OOM leak when reloading services.
I've created an example, just using this Listener (and uncomment cluster/client code) for any webapps, and seeing permgen space increase when reloading services (at least 2 times).
public class ContextListener implements ServletContextListener {
public static RiakCluster cluster = null;
public static RiakClient client = null;
@Override
public void contextInitialized(ServletContextEvent sce) {
try {
// RiakNode.Builder have perm gen leak when initialize any instance
RiakNode.Builder builder = null;
// builder = new RiakNode.Builder();
List<String> addresses = new LinkedList<String>();
addresses.addAll(Arrays.asList("anyip:port".split(",")));
// or memleak when call buildNodes also
List<RiakNode> nodes = null;
// nodes = RiakNode.Builder.buildNodes(builder, addresses);
// cluster = new RiakCluster.Builder(nodes).build();
// cluster.start();
// client = RiakClient.newClient();
} catch (Exception e) {
}
}
@Override
public void contextDestroyed(ServletContextEvent sce) {
if (cluster != null)
cluster.shutdown();
if (client !=null)
client.shutdown();
}
}
I'm using Riak java client (2.0.4) for our jax-rs services and I've encountered permgen OOM leak when reloading services.
I've created an example, just using this Listener (and uncomment cluster/client code) for any webapps, and seeing permgen space increase when reloading services (at least 2 times).
Thanks,
Cong Nguyen