Skip to content

Doctrines event subscriber out of memory. #28010

Closed
@ln-e

Description

@ln-e

Symfony version(s) affected: 4.*

Description

  1. Create Doctrine's EventSubscriber.
  2. Inject into in some service.
  3. Inject into that service EntityManagerInterface
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in var/cache/dev/ContainerLFEgQjr/getDoctrine_Dbal_DefaultConnectionService.php on line 1

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in var/cache/dev/ContainerLFEgQjr/getDoctrine_Dbal_DefaultConnectionService.php on line 1
PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in vendor/symfony/debug/Exception/OutOfMemoryException.php on line 1

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes) in vendor/symfony/debug/Exception/OutOfMemoryException.php on line 1

It worked in symfony 3.3 but it didn't work after update to symfony 4.1

How to reproduce
https://github.com/ln-e/symfony_out_of_memory

Possible Solution

Additional context

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