Welcome Guest, Not a member yet? Register   Sign In
Memory Limit Help!
#1

[eluser]tjtyrrell[/eluser]
So I am upgrading a site that was once in ColdFusion and I've moved it to PHP via CodeIgniter.

I created an upgrade script as the old site had over 10 GB of images. I have converted the site to have an asset library so it doesn't rely on directory scanning for images (we've converted to image galleries and such).

So this upgrade script scans the directory for images (remember, 10 GB worth), picks each one individually, adds the image to the DB Asset Library, moves the image to the new location, uses image_lib to resize into the different sizes for the site (thumbnails, etc)...

Going through this loop and creating several thumbnails, I end up reaching the memory_limit no matter how high I set it (so far 512m). The solution beyond that is -1, which is not ideal in my perspective... Obviously I'll be changing it after the import.

I've checked the files, and there isn't an individual file larger than 8.9mb, this leads me to believe that somehow image_lib isn't clearing is memory through each iteration. After each I run image_lib->clear(), but that's just a settings thing.

Is there a setting for image_lib/gd2 that tells it to free memory after each resize? It seems to me that it's acting like Photoshop trying to open 10gb worth of files, when I just want to open one at a time and close it after completion (much like a Photoshop Batch script). Any help would be appreciated.

The scripts are working, I just need to find a way for GD2 to flush its memory or something after each image. (right now my scripts are running on 10gb of data, and I am just crossing my fingers).


Messages In This Thread
Memory Limit Help! - by El Forum - 12-11-2013, 04:57 AM
Memory Limit Help! - by El Forum - 12-11-2013, 11:19 AM
Memory Limit Help! - by El Forum - 12-11-2013, 12:54 PM
Memory Limit Help! - by El Forum - 12-11-2013, 01:05 PM
Memory Limit Help! - by El Forum - 12-11-2013, 01:08 PM
Memory Limit Help! - by El Forum - 12-11-2013, 01:27 PM
Memory Limit Help! - by El Forum - 12-11-2013, 01:53 PM
Memory Limit Help! - by El Forum - 12-11-2013, 02:24 PM
Memory Limit Help! - by El Forum - 12-11-2013, 02:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB