Skip to content

ElasticaLogger Memory Leak #1984

@rela589n

Description

@rela589n

ElasticaLogger leaks memory.

It has a reset() method:

    public function reset(): void
    {
        $this->queries = [];
    }

But it produces no result, since it's never tagged with kernel.reset tag:

<service id="fos_elastica.logger" class="FOS\ElasticaBundle\Logger\ElasticaLogger">
    <argument type="service" id="logger" on-invalid="null" />
    <argument>%kernel.debug%</argument>
    <tag name="monolog.logger" channel="elastica" />
</service>

Service has no tag. See bin/console debug:container fos_elastica.logger:

Information for Service "fos_elastica.logger"
=============================================

 Logger for the Elastica.

 ---------------- ------------------------------------------ 
  Option           Value                                     
 ---------------- ------------------------------------------ 
  Service ID       fos_elastica.logger                       
  Class            FOS\ElasticaBundle\Logger\ElasticaLogger  
  Tags             monolog.logger (channel: elastica)        
  Public           no                                        

Consider tagging it with this tag.

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