Skip to content

ERROR ResourceLeakDetector:171 - LEAK: ByteBuf.release() was not called before it's garbage-collected #545

@JayathmaChathurangani

Description

@JayathmaChathurangani

When I do a load test for this simple service (relevant classes are there below)

@Path("/hello")
public class MyService {

    @POST
    @Path("/payloadCheck")
    @Consumes("application/json")
    @Produces("application/json")
    public Response get(MessageFormat msg) {
        return Response.status(Response.Status.OK).entity(msg).build();
    }
}

public class MessageFormat {
    private String size;
    private String payload;

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public String getPayload() {
        return payload;
    }

    public void setPayload(String payload) {
        this.payload = payload;
    }
}

public class Application {
    public static void main(String[] args) {
        new MicroservicesRunner()
                .deploy(new MyService())
                .start();
    }
}

The error on the terminal is
ERROR ResourceLeakDetector:171 - LEAK: ByteBuf.release() was not called before it's garbage-collected. See http://netty.io/wiki/reference-counted-objects.html for more information.
Recent access records:

How to fix this?
(For a single request it works fine)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions