I am having a problem in adding photos to my album. I have all the photos uploaded to a directory and then I try to link those images to my album and I keep getting an error message.
Here is a sample of what I get:
Estimated time remaining: 4:15
Memory used: 23975056, total: 90M
Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/GalleryStorageExtras.class at line 1149 (GalleryCoreApi::error)
in modules/core/classes/GalleryStorage.class at line 548 (GalleryStorageExtras::removeAllMapEntries)
in modules/core/classes/GalleryCoreApi.class at line 2975 (GalleryStorage::removeAllMapEntries)
in modules/imageblock/classes/ImageBlockHelper.class at line 777 (GalleryCoreApi::removeAllMapEntries)
in modules/core/classes/helpers/GalleryEventHelper_simple.class at line 59 (ImageBlockHelper::handleEvent)
in modules/core/classes/GalleryCoreApi.class at line 2238 (GalleryEventHelper_simple::postEvent)
in modules/core/classes/GalleryItem.class at line 440 (GalleryCoreApi::postEvent)
in modules/core/classes/helpers/GalleryItemHelper_medium.class at line 183 (GalleryItem::save)
in modules/core/classes/GalleryCoreApi.class at line 1668 (GalleryItemHelper_medium::addItemToAlbum)
in modules/itemadd/ItemAddFromServer.inc at line 313 (GalleryCoreApi::addItemToAlbum)
in modules/itemadd/ItemAddFromServer.inc at line 190 (ItemAddFromServer::addItem)
in modules/core/ItemAdd.inc at line 159 (ItemAddFromServer::handleRequest)
in ??? at line 0 (ItemAddController::handleRequestWithProgressBar)
in modules/core/classes/GalleryTemplateAdapter.class at line 1089
in g2data-69owls70/smarty/templates_c/%%3664482098/matrix/%%3A^3A8^3A818B59%%theme.tpl.php at line 75 (GalleryTemplateAdapter::trailer)
in lib/smarty/Smarty.class.php at line 1255
in modules/core/classes/GallerySmarty.class at line 61 (Smarty::fetch)
in modules/core/classes/GalleryTemplate.class at line 241 (GallerySmarty::fetch)
in main.php at line 506 (GalleryTemplate::display)
in main.php at line 104
in main.php at line 88
The gallery information is:
Gallery version 2.3.1
PHP version 5.2.17 cgi-fcgi
Webserver Apache
Database mysqli 5.1.56-log
Toolkits SquareThumb, ImageMagick, Thumbnail, NetPBM, Gd
Operating system Linux berlin 2.6.32.8-grsec-2.1.14-modsign-xeon-64 #2 SMP Sat Mar 13 00:42:43 PST 2010 x86_64
Browser Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1
After this happens I have been deleting the album and starting again. Sometimes that works and sometimes it don't. Any suggestions on how to get my images to display would be greatly appreciated.
Posts: 8339
So some get added and it stalls?
How many images are you trying to add?
Are they in separate sub-directories, or all one album?
Server_add method will respect your directory structure, creating new albums for each sub-directory.
-s
All New jQuery Minislideshow for G2/G3
Posts: 28
On this particular album there are about 800 images and the most I have gotten up before it stalls is about 600 images. They are all in one album. I had this problem with other albums that had lesser number of images, but I just kept at it until I was able to get them all loaded. I have not been able to do that with this album. Any suggestions?
Posts: 8339
that is alot of images for one album and not very good media management.
Everytime someone views that album, gallery has to load all access ids - all 800 of them. If you are on a shared server you will definitely kill your resources.
If someone views the cooliris slideshow, it will load all 800 items and kill the client and your server.
-s
All New jQuery Minislideshow for G2/G3
Posts: 28
What would you suggest as to the maximum number of image per album?
Posts: 8339
It really depends on your server's resources.
Its usually easy enough to break media up into sub-albums/sub-categories by date/event/relevance...
Start w/ a couple of hundred and see how your site performs.
Also uploading, try Uploadify
-s
All New jQuery Minislideshow for G2/G3
Posts: 1
I had a similar issue on my website, and like suprsidr said, it was because of the server.
I was using shared hosting at the time, and was able to correct this by upgrading to a VPS. If you don't want to do that, I'd ask your host how congested the server they have you on is (I'm assuming you're using shared hosting).
Posts: 28
I got switched over to VPS, but I still have the problem. Each time I try to add the images to gallery from a directory on my web server it times out and the error message says it is using 90mb of memory. I have broken my images down to groups of not more than 200 per album and I still have the same problem. Is there a way to increase the amount of memory to use for adding images to gallery? I am suppose to have 2300 MB of memory. How do I use all of it for adding my images to gallery?
Posts: 8339
can you post a link to your phpinfo
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 1642
Also, what is the typical size of the images you are adding?
--
dakanji.com
Posts: 28
The images are 1080x720 ppi
Posts: 28
I just created file and uploaded it. It is located at www.mempics.com/MP-Photos/phpinfo.php
Posts: 1642
That is resolution ... size is measured in bytes, kilobytes, megabytes etc.
--
dakanji.com
Posts: 8339
Your memory_limit is set to 90M, which should be enough in most instance.
You can try to add more by adding a line to your gallery2/config.php line ~29 just after: @ini_set('display_errors', 0);
add: @ini_set('memory_limit', '128M');
also make sure you are not using GD as your graphics toolkit as it shares memory w/ php
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 28
The images are around 400,000 bytes
Posts: 1642
That is 390kb which is not too bad.
See suprsidr's post above with the only addition being that since you are on a VPS, you can change the "memory_limit" in your php.ini file which is in "/etc/php5/cgi/php.ini" (restart Apache afterwards).
I am surprised that your PHP 5.2.17 does not have 128M by default. You can/should actually go much higher since you say you have 2gb of RAM.
As suprsidr wrote, GD runs as part of PHP and thus shares the available PHP memory with other PHP processes. For people on shared hosts, it is often recommended to use a toolkit such as ImageMagick as this uses memory independently of PHP since they don't normally have the option of increasing the memory_limit.
That is, if the GD procedure requires 256M of memory while other PHP processes are using 64M and your memory_limit is set to 128M, this will crash because the combined requirement will be 350M. This is often why GD is often incorrectly described as a memory hog (it actually generally doesn't use any more memory than IM does).
With IM, PHP will use the 64M and IM will use the 256M it needs (its limit is the available memory overall).
So your choice is to switch to IM or simply increase the memory allocated to PHP.
At the end of the day, both will still need the same amount of memory to complete the task. In your shoes, since you have all that RAM, I'll allocate a lot more to PHP and stick with GD. My rough rule of thumb is 1/4 to 1/2 of the available RAM. In your case, that translates to between 512M to 1024M.
--
dakanji.com
Posts: 8339
GD has been known to have issues w/ square thumb module, so use IM if IM passes all its tests.
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 1642
PS. You should also look into using the archive upload facility which lets you zip up the files on your local machine and possible ftp it to a folder on the server and then adding to your gallery from there.
This will remove the upload memory consumption (which can be significant) and is probably the better option for mass uploads.
--
dakanji.com
Posts: 28
Thanks for all the information. What I have been doing is uploading all my images to different directories on my web server and then linking to gallery from there. I have increased the RAM to 256 and have been trying to use that. I have been getting error messages that I have been having server problems since I increased the memory. However, I just got an email from my web host that they have moved my site to a new server so no doubt that may has caused some of my problems. So I am going to give it a few days to see if I am still having problems and if so I will contact you again. Thanks for the help.