symfony - Populating FosElasticaBundle running out of php memory, possible memory leak? -
i've installed foselasticabundle , have working cross section of data.
my problem arises in have 14m rows need use build index. ran populate command , after 6 hours yesterday errored out @ 10.8% memory error:
php fatal error: allowed memory size of 2147483648 bytes exhausted (tried allocate 52277 bytes) in /var/www/html/vendor/monolog/monolog/src/monolog/formatter/lineformatter.php on line 111
as can see i've set php memory limit 2g should quite excessive.
the last line before error looked like
populating index/entity, 10.8% (1315300/12186320), 36 objects/s (ram : current=2045mo peak=2047mo)
and current , peak ticking every line, starting around 30mb.
my assumption here there sort of memory leak? surely php's memory shouldn't exhausted process. i've tried command parameters
app/console fos:elastica:populate --no-debug --no-reset --env=prod
but watch running current memory still ticking up.
any thoughts on might going on here , can debug it? found discussion sounds problem, doesn't present solution: https://github.com/friendsofsymfony/foselasticabundle/issues/82. i'm using doctrine , default provider.
thank you-
i'm not able solve memory leak entirely, running command
app/console fos:elastica:populate --no-debug --no-reset --env=prod --offset=n
i've been able populate in batches. drastically cut down amount of memory leaking turning off logger, using solution on page
https://github.com/friendsofsymfony/foselasticabundle/issues/273
setting php memory_limit 4g (!) i'm able more 5m records populated without error, , after couple of batches should done process.
most solutions seem involve writing custom provider (see https://github.com/friendsofsymfony/foselasticabundle/issues/457) through ridiculous memory_limit , limiting memory leak as possible didn't need to.
Comments
Post a Comment