-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in update_all_products.pl #2053
Comments
Trying Devel::MAT https://tech.binary.com/tracing-perl-memory-leaks-with-devel-mat/ I'm testing update_all_products.pl, with 1 product updated, 10 products, and 100 products. The memory does grow: -rw-r--r-- 1 off off 477508290 Jul 4 17:47 file.pmat with file50.pmat: pmat [more]> count (total) 4782580 4708 425.3 MiB 1.3 MiB pmat [more]> largest with file100.pmat: pmat> count (total) 5390411 4713 473.5 MiB 1.3 MiB pmat> largest |
Seems to be the spellcheck of unknown ingredients to check if they are additives: -rw-r--r-- 1 off off 521900462 Jul 4 19:36 file100.pmat.process_ingredients |
More precisely, this call: my $tagid = get_fileid($candidate); (on many many candidates) |
Maybe a Perl 5.24 issue: https://rt.perl.org/Public/Bug/Display.html?id=130254 5.24.1 is used on the dev server and production. |
|
We can replace some of the regular expressions in get_fileid by tr(), which should be faster. It makes the memory usage go down: -rw-r--r-- 1 off off 469421679 Jul 4 23:32 file100.pmat.new_get_fileid_with_ |
…ory-leak replace regexps by tr, alleviate regexp memory leak, bug #2053
|
Same discussion: |
@VaiTon : thanks! I'm not sure we want to disable the warnings though. |
There are memory leaks when updating products with update_all_products.pl (not through Apache and mod_perl).
When the process starts, after the taxonomies are loaded:
after 5 minutes:
another 5 minutes:
The process eventually gets killed, or we run out of memory and swap.
The text was updated successfully, but these errors were encountered: