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
use symfony typesense:import --max-per-page=10000 on large amont of values from your database to typesense.
Crash appened close to 15000 Entities in memory.
Reason :
The process throw a fatal error : OutOfMemoryError from Doctrine's classes because Entity manager isn't cleared.
Hi,
To reproduce :
use
symfony typesense:import --max-per-page=10000
on large amont of values from your database to typesense.Crash appened close to 15000 Entities in memory.
Reason :
The process throw a fatal error : OutOfMemoryError from Doctrine's classes because Entity manager isn't cleared.
Here is the fact : You must detach Objects from Doctrine by clearing the entity manager.
$this->em->clear()
Here is the ressource that made me think about it.
https://www.doctrine-project.org/projects/doctrine-orm/en/2.14/reference/batch-processing.html
Suggestion :
Here is the change i made from the ImportCommand class :
I've made a fork using this edit, everything seem's ok :
I didn't noticed big performance issues.
Hope it could help,
Have good day.
Originally posted by @N2oo in #74 (comment)
The text was updated successfully, but these errors were encountered: