mistic100
Hi
FTP sync absolutely not planned for removal, why do you even worry ?
yes we promote browser upload because more covenient but FTP won't disappear
also, Piwigo 2.7 DOES use HTML5 upload, we totally removed the Flash uploader, only the Community plugin still use Flash upload for various reasons (I don't know)
[deleted]
Hi,
Thanks for the quick reply. Great to hear FTP/Synchronization won't be deprecated, the way it was discouraged in some places in favor of web upload made me think that.
But the main problem as I've mentioned is that the current way that thumbnail/squares/multiple-sizes etc is implemented it can easily overpower the server and bring it to its knees, freeze it, even crash it where you have to reboot. I've found that I'm not the only one experiencing this, and neither switching from GD or imagick makes much of a difference. I think piwigo needs to start controlling more strictly the imagick convert of GD processes so they are not allowed to kill the server whether due to disk IO or CPU or both.
I've mentioned a couple methods such as "nice" setting for processes or limiting so that only one image is processed at a time, or limit on number of concurrent convert processes/threads. There could be other even better methods I don't know of, I'm just hoping a solution to this will be possible soon. Looking forward to hearing back in regards to this, thanks
Also, where is the HTML5 upload that allows uploading more than one photo at a time though? I can't seem to find it, on my install I do have a flash uploader where I can shift-select multiple files and upload that way, but if I click on the alternative web upload it only allows one photo at a time. Also the speed of upload does not compare with FTP. Oh, also, I did install the Community Plugin since I usually require photogalleries to allow for members to upload photos also, not just the administrator, so I see the Community Plugin as the most important plugin, one that should probably be installed by default.
mistic100
Admin / Photos / Add ... obvious location
If you don't have this uploader
http://www.plupload.com/examples/queue well I'm sorry to tell you that you are not in 2.7 :-)
I don't react on your main concern because I don't have any knownlege in this kind of stuff, I don't even know if it is possible (I highly doubt on shared hosts)
[deleted]
All my Piwigo installs are on my own servers not shared servers. Actually shared servers have their own 'CPU throttling' and software to limit users so that piwigo or other software won't crash their shared servers and affect hundreds of users and so that one user doesn't hog up all the server's resources. Dedicated servers do not have all this CPU throttling/limiting etc and so will give piwigo/convert/GD as much as it asks until sometimes it crashes the server.
On one of my servers right now I can't login to remotely anymore so I will have to reset the power switch on it. It got killed after I added some photos when it started to try and make usual thumbnails etc...
Anyway, hopefully you can pass on my feedback in regards to this to the developers on the piwigo team who may be able to work on this, I can be contacted directly if they need any more details or feedback.
I will look for the ploader you mentioned, perhaps its a plugin I didn't enable or something or maybe I was trying to upload with Community Plugin into my 'user' gallery, the community plugin does not have the HTML5 Batch upload loader?
[deleted]
Well after I did a power off/on reset, server rebooted ok but as soon as i tried to load the piwigo gallery in browser it started to freeze up, so I'm not sure if gd processes are re-triggered on html load or what's going on since I can't really run any commands like top or ps aux etc due to server being unresponsive.
--UPDATE ok after second reboot, and retrying to load piwigo in browser, was again unresponsive but after a long time finally it loaded, although seems no thumbnails are loading for the albums and if i click on an album, again it becomes unresponsive taking forever to load. --update still unresponsive, i may have to reboot yet again.
Also found this somewhat different performance issue someone else posted:
http://piwigo.org/forum/viewtopic.php?id=23686
I'm hoping performance can be improved in upcoming releases and will especially be looking forward to a workaround to the image resizing/thumnails/etc thrashing/crashing servers issue. Thanks.
[deleted]
By the way, in case it helps, a lot of the images are 9MB in size mostly, but varies 5MB to 10MB although a few rare JPEGs can be as high as 18MB or 2OMB. Many are very high resolution, 7360 x 4912 being the highest resolution, others a bit lower than that.
[deleted]
I found another thread on here basically discussing the same issue:
http://piwigo.org/forum/viewtopic.php?id=22348
As you can see even on your own recommended hosting provider, they were trying to ban i.php due to CPU %load abuse.
I can time after time replicate these issues basically 100% of the time on different servers, with default install of a fresh new piwigo installation, uploading a gallery directory to /galleries/ subdirectory and then just try to access the gallery, go to batch manager and it becomes unresponsive due to the image resizing etc taking place. Many times end up having to reboot the server to be able to log back in.
Anyway, I hope this documentation and references will help prove this is a legitimate problem that needs to be fixed, soon hopefully. I'm open to testing out any patches etc, and can be contacted directly by the developers. Thanks.
[deleted]
In hopes to be more useful in helping in the process of a solution to this, I've done some research on imagick 'faster' alternatives.
Please note that I think the real solution to this problem is how Piwigo and i.php is called and how it in turn calls and controls image resizer processes such as /usr/bin/convert or others. So although I would like to see some of these other resizers supported by piwigo such as epeg and gm (GraphicMagick) and Econvert (ExactImage), or others, UNLESS somehow these other resizers/converters are a lot smarter and can monitor themselves and IO/CPU usage or set nice levels etc, it will still be necessary for piwigo itself to CONTROL these processes and don't let them get 'out of control' such as they consume 100% of a server's resources and crash the server, as is happening currently on all of my piwigo installs even with just "one" user, due to multiple image uploads and the resulting spawning of resize/convert/gd etc to create the multiple size images and thumbnails.
I hope to hear a response in a day or two from the developers in regards to this issue to see if it will be taken seriously and given high priority. If not I'm left without much options, either drop piwigo from any installation and go with other gallery software, some of which I've used before (not polite to list here), or perhaps I will create a "fork" of piwigo and start a version of piwigo that will address these issues and take it in a direction more in line with my needs emphasizing robustness. My hope is that this will be fixed in piwigo itself. Thanks!
Here's some of the more interesting links from my online research on FAST jpeg resizers versus GD/imagick (I'd highlight EPEG, GraphicsMagick, Econvert, and VIPS for now):
GM PECL plugin or VIPS
http://www.collectiveaccess.org/support/forum/?p=/discussion/1078/any-chance-for-imagemagick-replacement/p1
Graphicsmagick vs imagemagick
http://codeascraft.com/2010/07/09/batch-processing-millions-of-images/
https://github.com/mattes/epeg
epeg
http://www.systhread.net/texts/200507epeg1.php
VIPS fast
http://www.vips.ecs.soton.ac.uk/index.php?title=Speed_and_Memory_Use
ECONVERT drop-in replacement for imagick convert
http://www.exactcode.com/site/open_source/exactimage/econvert/
GraphicsMagick optimized
http://www.kitchensoap.com/2009/04/03/slides-from-web20-expo-2009-and-somethin-else-interestin/
GraphicsMagic vs Imagemagick P2
http://sourceforge.net/p/graphicsmagick/mailman/graphicsmagick-help/thread/alpine.GSO.2.01.1003122033340.1592@freddy.simplesystems.org/
convert with mogrify or epeg
http://leocharre.com/articles/faster-image-resizing-in-linux/
http://packages.ubuntu.com/lucid/exactimage-perl
node.js so can facilitate client/browser-side thumbnail creation and upload?
https://github.com/lovell/sharp
in referece to above see also
http://stackoverflow.com/questions/2303690/resizing-an-image-in-an-html5-canvas
http://fir4j.sourceforge.net/
http://agschwender.github.io/pilbox/ https://github.com/agschwender/pilbox OR thumbor
http://thumbor.org/
http://developers.lyst.com/data/images/2014/06/23/openross/ https://github.com/ssaw/openross https://news.ycombinator.com/item?id=7931744
http://www.libjpeg-turbo.org/
http://stackoverflow.com/questions/11396856/rotating-hundreds-of-jpegs-in-seconds-rather-than-hours
http://www.kitchensoap.com/2009/04/03/slides-from-web20-expo-2009-and-somethin-else-interestin/
http://superuser.com/questions/315885/fast-batch-image-resizer
http://stackoverflow.com/questions/11767106/resizing-images-jpeg-or-decompressed-image
good for benchmarking various resizers
https://github.com/fawick/speedtest-resize
http://vanillaforums.org/discussion/6395/php-script-resize-jpg
services
https://imageshack.us/pages/resize/
https://github.com/jruby/jruby/wiki/C-Extension-Alternatives
http://www.thebuzzmedia.com/software/imgscalr-java-image-scaling-library/
http://www.graphicsmagick.org/benchmarks.html
[deleted]
Possible interim solution proposal:
Create THUMBNAILS/squares/L/S/XL/etc resized images on another system and then UPLOAD the resulting images.
Recomend that the thumbnails for various settings woudl be put in separate directories or give specifics on location and naming structure and how we can disable auto-generation once we upload already created thubnails etc..Is this info and method already fully documented somewhere?
For those opting for this method there are some GPU solutions I've come across which should be much faster since they use GPU/CUDA/OpenCL etc:
https://imageresizergpgpu.codeplex.com/
Now going back to the more realistic solution, back to server-side resizing, another library I found is:
imlib2 which supposedly is pretty FAST also.
more votes for EPEG
http://superuser.com/questions/249646/fastest-jpeg-thumbnail-generator-for-linux
https://github.com/mattes/epeg
http://stackoverflow.com/questions/486874/stretch-resize-or-thumbnail-an-image-using-perl
http://search.cpan.org/dist/Image-Imlib2-Thumbnail/lib/Image/Imlib2/Thumbnail.pm
http://www.manpagez.com/man/1/vipsthumbnail/
https://github.com/jcupitt/libvips http://www.vips.ecs.soton.ac.uk/index.php?title=VIPS
vips discussion
https://github.com/lovell/sharp/issues/41
SWIGGLE might be interesting
http://homepage.univie.ac.at/l.ertl/swiggle/
interesting
http://stackoverflow.com/questions/11727860/imagemagick-batch-resizing-performance
benchmarking
https://gist.github.com/488401/9406e78f34503befe966d8fb0dd4c3d25bc51371
Anyway seems that VIPS and imlib2 and especially EPEG are worth looking into supporting, and also restructuring how these resizers whether imagick/gm/gd or other are called and controlled to prevent "abuse" over-consumption / overload of system resources leading to server freeze, crash...
plg
Hi JT,
I assume that the sync itself works fine, it's just the fact that when you open the album on gallery side, Piwigo has to generate 15 (or more) thumbnails at once from the original photo. Try this method:
1) in the sync, only apply to directories, it will create empty albums if new directories are found
2) on page [Administration > Albums > Properties > Lock], lock albums where you know there are new photos
3) go back on [Administration > Tools > Synchronize] and now synchronize directories+files
4) on page [Administration > Photos > Recent Photos], it will have to generate 20 thumbnails, but not more. Select "the whole set" and use the action "generate multiple size images", first generate size M, then size Thumbnail. Resized photos will be generated one by one, avoid to take to much CPU on your server.
5) on page [Administration > Albums > Properties > Lock], unlock albums
Tell us if this workflow makes things better for your server.
flop25
you can already genertae the resized pictures locally and then upload them ; already discussed several times
plg
flop25 wroteyou can already genertae the resized pictures locally and then upload them ; already discussed several times
Hi flop25,
Do you know if there is a script provided to generate the resized photos before upload?
flop25
hmm don't remember something like this that someone published or posted
if you do, you could post in the wiki
[deleted]
Hi Plg,
Thanks I'm trying to figure out the steps you listed.
I've just done step 1) you listed.
Step 2) : Done also
Step 3) : Done also
Step 4) : Here maybe not as planned? I clicked on Photos->Recent Photos and at the top it says predefined filter latest import and lower it says 85 photos in current set none selected, and the browser circle thing is keeping moving and I can hear hard drives crunching, I think that whenever I go to this page or to the "Batch Manage" page, that it automatically starts crunching to show me those square previews of images on these pages.
But at least so far i haven't lost control of server so maybe it is doing less resizing at a time etc..
when this "Crunching" is all done is when I can do step 5) and unlock album?
Is there a good writeup on file names/structure etc for producing the thumbnails on windows etc and just uploading them also to server so the server doesn't try to make them? Although I still think there needs to be a fix for this so server can do only one by one but without going through all those steps each time that you mentioned. Looking forward to such a fix. Thanks!
[deleted]
Well as I explained, soon as I went to the Recent Photos the hard drive started crunching , before I had a chance to choose select whole set and generate M medium ....so i left it like that for quite some time.
But even now the browser thing was still spinning and not all the images had an actual 'preview' on that Recent Photos page (first/page1 didn't check rest), so I had assumed the hard drive crunching was it trying to create previews for the images, previews that show up on that "Recent Photos" page.
Anyway, during this time I had tried to load the main gallery page also but was too slow so i just closed the tab. At least my putty/ssh shell is still working and hasn't frozen like before.
So now I finally decided to go ahead and run the rest of the STEP 4 you mentioned and seleted 'whole set' (85 photos) and chose "M" and clicked to go and now it says:
Generate multiple size images
0/0 0/0
I just checked in the _data/i/galleries/currentgallery/
and there's like 14 or 15 total files mostly -th and one -me and two -sq
Could it be spinning its wheels for nothing? after some time i still see:
Generate multiple size images
0/0 0/0
And still says only 15 images in _data/i/galleries/currentgallery
Now I should mention that this particular install is the SLOWEST of the systems i've tried piwigo on, it is basically a WD My Cloud Mirror device which can also run Wordpress etc. The other systems were real datacenter-grade powerful servers though and still had similar issues.
Can you make a simple OPTION in the configuration somewhere so that we can choose:
1.) TURN ON/OFF Image Resizing to be restricted to ONLY one file at a time.
2.) TURN ON/OFF dynamic Resizing, ie the type that happens when a USER loads an image or a page view showing thumnails so that if Medium sized images or thumnails don't exist we can choose to either let the system create them or just show placeholder instead.
I think these two options shouldn't be hard to add and will make it a whole lot easier for many people to avoid server crashes etc when doing batch uploads of many images or FTP sync etc...
I'm also interested in any write-up wiki-page etc that may explain how to pre-create all the necessary multiple-sized images/thumnails and upload those to piwigo server so it doesn't have to generate anything itself. Of course this isn't very feasible for Community Plugin users.
I would propose an UPLOAD mechanism for BATCH UPLOADING that works even on Community Plugin, user uploads allowing non-flash HTML5 etc batch upload for community plugin usage so that perhaps multiple sized images are created on the CLIENT/Browser side during the upload process so that the server will not need to create such images. I'm thinking that NODE.JS or other browser-side technology may help with this, or create a JAVA APP that can be run from the browser that will handle all this if its not possible with just HTML5/node.js or similar.
Do you have a PLUGIN SDK Tutorial for Piwigo? What are the licensing terms, what license must the plugins created be, any kind of open source license or exactly the same as piwigo etc?
To me it makes the most sense to "AUTOmatically" make the uploader create the needed thumnails, OR at least have them create just the first "M"/medium one if not everything. It should be unnoticed by the end-user uploader, they should just select files they want to upload and click upload, and the piwigo plugin etc should take care of the rest. Then on the server side, if not 'everything' was created by the Client/Uploader then it will just create thumbnails etc from the M/medium and the others on demand/request if so allowed in Album preferences. thanks
[deleted]
Hours have passed and uptime on server is still 9.7 or so and on the firefox browser tab with
http://192.168.11.7/photogallery/admin.php?page=batch_manager&filter=prefilter-last_import
the circle thing is still spinning/busy while at the bottom it still says:
Generate multiple size images
0/0 0/0
At this point I think i will Reboot again and re-try your Steps 1-5 yet again and see how it goes.
the ls | wc -l on _data/i/galleries/currentgallery still shows same 15 files only...
[deleted]
Rebooted and tried your 5 steps again.
But again at STEP 4 i don't think things are going as its supposed to, I only see 4 preview images on teh Recent Photos page out of the 20 on first page, i even think previous time before reboot was the same or even a couple more. And it SEEMS that piwigo starts to try and CREATE these preview images even BEFORE i click submit to create Medium sized images...and that might be the current problem.
Is there a way to DISABLE the creation of these PREVIEW images on the Batch Manager and the "Recent Photos" pages? thanks
[deleted]
Well seems it did freeze/crash the server again. I had simply gone to
http://serverip/photogallery to see the main galelry page and after a while, it did finally load but the album had no preview image and at the lower right of the page there was some kind of floating bar with apparent movement as if it was trying to load something or do something. Anyway after a while with that bar not going away i just closed the tab.
But now my putty/ssh to the server is unresponsive/frozen again and I am forced to reboot the server again. At this point I will wait for Plg to see what suggestions he may have. thanks!
flop25
what's the server cpu etc? for instance i have a very small server 1.80GHz 4go ram which runs 2 piwigo 1 WP and other stuff; the galleries are faster than wp and the picture generation doesn't crash the server just a hight load of the cpu
piwigo won't change the technology because the script is meant to be used on shared server too
[deleted]
Thanks for the reply, as I've mentioned I have this problem on several different servers, some quite powerful, but this current one is the smallest, I mentioned it was the WD My Cloud Mirror 8TB and it should have a 1.2Ghz CPU, it has wordpress on it also. This piwigo installation is not meant to be used my multiple users, just ONE user at a time and the only problem is this image resizing generation, I think that without this issue piwigo would run just fine on it.
I was hoping PLG had some suggestions on how I can get piwigo running without killing the server since I already tried his STEPS 1-5 suggestions but got stuck at Step 4 which seemed to be because piwigo was trying to create "PREVIEW" images on the "Recent Photos" page. (As it also does on the Batch Manager page)
So one of my important questions is how can i DISABLE preview image generation on the Recent Photos page and the Batch Manager page so when i go to those pages piwigo doesn't try to generate 'previews' of the images there.
I think an uploader that handles generating resized images would be a huge improvement.