Last list night, I noticed that my random photos were having issues. Delving deeper, I discovered that my entire photo gallery system was relatively broken. I changed a few obviosuly broken directory pointers, and things started working better. Unfortunately, the main Checksum Arcanius Photo Gallery page was stopping after only a few galleries, instead of displaying all 35 albums, as I had instructed it to. It wasn’t clean either — it appeared that the script had simply stopped running. Furthermore, I noticed that the random pictures script was dying saying that it was running out of memory.
This surprised me, since I wasn’t doing any actual image manipulation, only display of already exisiting images, and the php.ini limit of 8M should have been plenty, I thought, for this. Nevertheless, I tried increasing it, first to 16M. I reloaded apache and then my site. More of the gallery page loaded, but the random block script was still dying, this time using up all of the 16 Megs it was allocated. Never one to give up that easily, I bumped the number up two more times, until it stood at a ridiculous 128 megs. The main page started to work, but the random blocks were still dying from lack of memory.
I decided it was time to try Gallery2 again, even though my last experience was less than stellar.
Bad Idea.
Everything is still wrong with Gallery2 that was wrong with it before. And its a bigger memory hog than its younger sibling (Gallery 1.5) that I am currently using. When trying to import single albums, php died citing too many open files, and the memory usage soared into the hundreds of megabytes. Ridiculous.
So after giving the problem some time off, I came back to it tonight. I bumped the memory allotment up to 320 Megs, updated to the latest Gallery 1.5, and updated my custom random block script. The result was — finally — the random block cache was properly regenerated. I have since dropped the memeory limit back to a more “reasonable” 128 Megs; we shall see if this causes the site to break tomorrow when the cache expires. I tried 32 Megs earlier, but this amount still caused the main gallery page to fail to load completely. This is strange, because when this all was running on oasis (it has since been moved to frankenputen) the 32 Meg limit there worked fine, and I never had any issues. Could it be Ubuntu’s Apache or PHP is less efficient?
At any rate, I have decided that not only is Gallery2 still terrible, but Gallery 1.5 is not all that either. My plan is to develop my own photo gallery solution this summer,