I've installed FOSElasticaBundle and have it working with a cross section of my data.
My problem arises in that I have about 14m rows that I need to use to build an index. I ran the populate command and after about 6 hours yesterday it errored out at 10.8% with a memory error:
PHP Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 52277 bytes) in /var/www/html/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php on line 111
As you can see I've set my php memory limit to 2G which should be quite excessive.
The last line before the error looked like
Populating index/entity, 10.8% (1315300/12186320), 36 objects/s (RAM : current=2045Mo peak=2047Mo)
And the current and peak were ticking up with every line, starting around 30mb.
My assumption here is that there is some sort of memory leak? Surely php's memory shouldn't be exhausted by this process. I've also tried the command with some extra parameters
app/console fos:elastica:populate --no-debug --no-reset --env=prod
but as I watch it running the current memory is still ticking up.
Any thoughts on what might be going on here and what I can do to debug it? I found this discussion which sounds like my problem, but doesn't really present a good solution: https://github.com/FriendsOfSymfony/FOSElasticaBundle/issues/82. I'm using doctrine and the default provider.
Thank you-