ReactPHP memory problem with keep-alive connections

I have a API Rest developed with ReactPHP and FastRoute. If I call it from a web interfaz with header “Connection: keep-alive” the memory starts to increase until memory crash. I tried to change the header to “Connection: close” and there are not memory leaks.

Do you know why is this happening?
Can I disable keep-alive in my ReactPHP server?

Thanks

This is the code of my server

$server = new Server($loop, new ErrorHandler(), new JsonRequestDecoder(), new CorsMiddleware([
    'allow_origin' => [
        '*',
        'http://localhost:3000'
    ],
    'allow_methods'     => ['GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS'],
    'allow_headers'     => ['DNT','X-Custom-Header','Keep-Alive','User-Agent','X-Requested-With','If-Modified-Since','Cache-Control','Content-Type','Content-Range','Range'],
    'expose_headers'    => ['DNT','X-Custom-Header','Keep-Alive','User-Agent','X-Requested-With','If-Modified-Since','Cache-Control','Content-Type','Content-Range','Range']
 
]), new Router($routes));