Allowed memory exhausted
Issue #20
new
Hi,
I got an error message: http://tools.wmflabs.org/magnustools/unused_files.php?category=Photographs+and+images+by+Yann+Forget&depth=1&projects=
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4502480 bytes) in /data/project/magnustools/public_html/unused_files.php on line 68
Comments (3)
-
-
I tested the fix above and I confirm it works: see http://tools.wmflabs.org/erwin85/unused_files.php?category=Media_from_BEIC&depth=1 and http://tools.wmflabs.org/erwin85/unused_files.php?category=Photographs+and+images+by+Yann+Forget&depth=1&projects=
-
Turns out this tool was not the only one to neglect considering the size of img_metadata ;) https://phabricator.wikimedia.org/T96360
- Log in to comment
Thanks for filing, I meant to work on this too because I need the tool in BEIC projects. I can't find the tool in git but I read the source code on tools. The error happens at
which is quite unexpected. I think the bug is in the SQL query, which fetches way too much data:
I think "SELECT img_name, img_width, img_height" should be enough: memory required for each file should be at worst 300 B or so, while currently a single file can take multiple megabytes I think, considering the img_metadata field. https://www.mediawiki.org/wiki/Manual:Image_table#img_metadata