MicrostockGroup Sponsors


Author Topic: Not enough memory when listing all images  (Read 3630 times)

0 Members and 1 Guest are viewing this topic.

« on: April 08, 2013, 10:32 »
0
I discovered big problem (now only to me I suppose, but in future to others too) with "All images" list in admin area.

With 486 images uploaded (337 published, 149 draft), after clicking on "All images" , I saw "Allowed memory size exhausted" error in wordpress file meta.php. This error is well known, I modified one function (added $wpdb->flush(); ) and got about 5MB free memory, but  I made some calculations, and it will be only for about 250 next photos. Wordpress consumes huge amount of memory for cache, where it holds all info of every photo in the list. I may be wrong, but icreasing php memory to 128MB should allow to upload about 4000 images, and this problem will occur again. 256MB will be enough for about 8000 images.

Leo: Maybe it could be possible to force Wordpress not to hold everything in memory or "All images" list can be displayed partially somehow? When I choose only published or only draft files, memory usage is much lower, only for files selected. So, maybe some kind of range select, dates from-to, but set before "All images" clicking?
Or maybe load into memory info only about  images visible on page, and next portion after clicking on next and so on :)


Edit: memory usage is growing much faster, than i calculated earlier. After processing 20 new images (337 published and 169 drafts now) all 5 MB were used. So, I suppose that on servers with 256MB memory, this problem should occur with ~1000 images on the list :)
« Last Edit: April 08, 2013, 11:35 by ajt »


« Reply #1 on: April 08, 2013, 11:34 »
0
Do not process all at once.

I believe it's a hosting issue.


I only process once image at a time because my hosting memory is limited.

« Reply #2 on: April 08, 2013, 11:36 »
0
What happens if you do not have an "all images" , I don't think it is in the default and I only put it in because it was useful to be when I first started loading as it meant I could check I had categorised them all :)

« Reply #3 on: April 08, 2013, 11:37 »
0
I don't write about processing. List of all images, displayed after click on "all images" (on image below) in admin area consumes this memory :)
So, when someone with 256MB memory will have 1000 images uploaded and published, should see error message instead of that list :)

When I don't choose "all images", everything is ok, but I have some draft images and want to edit them somehow.
I'll try to uninstall plugins, maybe this will free some memory :)

Edit: after deactivating SEO plugin I got another 5MB and now I can see that list again, but after processing next 20 files it'll disappear again :)

Edit2: when SEO plugin is inactive, each item on this list occupies about 70KB in memory. Workaround now for me is "process to publish" to avoid draft files, and then display and edit each image, but don't touch this list never more :)
« Last Edit: April 08, 2013, 12:21 by ajt »

Leo Blanchette

« Reply #4 on: April 08, 2013, 13:58 »
0
Someone else discovers that yesterday and I'm working on it. Its a strange problem.


 

Related Topics

  Subject / Started by Replies Last post
19 Replies
9029 Views
Last post June 04, 2008, 14:59
by sharpshot
18 Replies
5704 Views
Last post August 24, 2009, 21:40
by goldenangel
11 Replies
3935 Views
Last post July 27, 2013, 17:49
by cascoly
2 Replies
2283 Views
Last post March 11, 2017, 05:21
by Mir
1 Replies
3621 Views
Last post December 11, 2017, 03:18
by Niakris

Sponsors

Mega Bundle of 5,900+ Professional Lightroom Presets

Microstock Poll Results

Sponsors