MicrostockGroup

Microstock Photography Forum - General => Symbiostock => Symbiostock - Technical Support => Topic started by: ajt on April 08, 2013, 10:32

Title: Not enough memory when listing all images
Post by: ajt on April 08, 2013, 10:32
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 :)
Title: Re: Not enough memory when listing all images
Post by: Jeffrey on April 08, 2013, 11:34
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.
Title: Re: Not enough memory when listing all images
Post by: Kerioak~Christine on April 08, 2013, 11:36
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 :)
Title: Re: Not enough memory when listing all images
Post by: ajt on April 08, 2013, 11:37
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 :)
Title: Re: Not enough memory when listing all images
Post by: Leo Blanchette on April 08, 2013, 13:58
Someone else discovers that yesterday and I'm working on it. Its a strange problem.