Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects AE rendering error (memory leak?)

  • AE rendering error (memory leak?)

    Posted by Bret Snyder on June 16, 2009 at 6:22 pm

    I bought a new computer about a year ago, which I believed to be more than enough to power AE and the other apps I use with it. It’s an 8-core 3.2 GHz Mac with 4 gigs of ram. However, AE is constantly erroring out during a render test of mine. Nothing more than basic screen screen (subjects are blacked out) with a jpg background. It’s about 35 minutes long. It error’d probably 3 or 4 times before I lowered the composition size from 640×480 to 320×240. One render made it through successfully in this size. I made an extremely slight change (just moving one of the subjects) and did another test render of 2 minutes. It was flyin right through and again, the render stopped saying it “Failed.” It never produces error log files, so I have no idea what’s going on.

    After a failed attempt, I’ll try it again and the program stops responding when I hit Render. From there, I have to force-quit and try again.

    I’ve turned on my Activity Monitor to see how much memory it’s soaking up, and it’s never anymore than ~2 gigs. Is this a memory issue? I find it completely hard to believe with this system.

    I would REALLY appreciate any knowledge that anyone can give me regarding the situation.

    Edit: the last render I did was again a 2 minute-length video. 2 minutes, 18 seconds into the render process, it failed. Activity Monitor showed it stopped at 2.84 gigs of memory (a constant climbing number until it failed there). It also displays “AE (null)” as the title of the process. And, after a failed render, AE sits at 2.84 gigs of memory. That memory never gets freed back up, which I’m guessing is why the application becomes non-responsive.

    Edit 2: After looking at how much Free memory I have, it shows around ~2.5 gigs (that’s with only AE and firefox open). If this is a memory problem, how much do I need to execute simple renders like this in AE? All it is, is a 320×240 key’d-out, silhouette subject with a different background (ideally an hour long – but even 2 minute-length fails). Should AE really need to use ~3 gigs of memory for this task? I am more than willing to put a few more gigs of ram into this computer if necessary, but I don’t want to add more if AE will use all of that ram up also, to the point of crashing. I’m wondering if it’s a problem beyond system requirements (which this computer should meet 3 times over). It’s really frustrating.

    Peter Monty replied 13 years, 5 months ago 4 Members · 17 Replies
  • 17 Replies
  • Kevin Camp

    June 16, 2009 at 8:06 pm

    hi bret,

    it might be helpful to know which version of ae you are using, i haven’t had too many memory leak type of issues with cs3 (8.0) and cs4 (9.0), but i’m sure there may still be some issues….

    also, if you are running cs4, there have been two updates, 9.0.2 was recently released and may help the issue you are having.

    however, there are some other things you can try to do to prevent errors that are related to ae having problems freeing up it’s ram cache.

    1. if you are running cs3 (8.0) or later, disable multiprocessing (preferences>multiprocessing – or memory & multiprocessing if using cs4 – then uncheck the option for rendering multiple frames simultaneously). with only 4gb of ram and other apps open, multiprocessing will most likely have negative effects on both stability and performance.
    2. try choosing edit>purge>all prior to rendering. this forces ae to clear all it’s ram cache.
    3. if the problem is specifically an image buffer size error, you can try to lower the max ram cache to leave more ram for the image buffer. if you have an ae version earlier than cs4 (9.0), lower the max ram cache value in preferences>memory & cache. if you have cs4, go to preferences>memory & multiprocessing and slide the ram cache slider towards longer previews.
    4. if you notice that during the render that the ‘ram’ value at the top of the render queue is hitting the max ram cache setting (60% would be the default for the max ram cache in cs3 and earlier) then crashing, then you can bet that ae is having trouble clearing the cache. you can remedy this by setting ae to purge frames at set intervals. to get this setting, hold ‘shift’ and the mouse button while selecting after effects>preferences>general, then from the preference window that opens, click the preference selection dropdown and at the bottom there should be one that says ‘secret’. select it and then set the ‘purge’ value to a number of frames that is less than where the crash occurred, ie. if it failed at 100 frames, set it to 80-90 frames. note, that you will want to rest that value to 0, or delete it after you are finished with this project, it should only be used when you see this type of problem.

    as far as adding more ram, with multiprocessing enabled in cs3 and cs4, ae can use as much as 3.5gb per processing core. with 8 cores, that would be 28gb of ram that can be used for rendering, and of course you’d like to have a bit extra for osx and other applications. in cs4, you can limit the number of cores that ae uses to make it scalable to you ram config in the multiprocessing settings, so if you have 16gb of ram you could set ae to use just 4-5 cores. you can also do this in cs3, but you need to edit the preference using a text editor or with a java script called ‘throttle’.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Bret Snyder

    June 16, 2009 at 8:15 pm

    Thanks very much for the response. An Adobe employee thought it was just because I only have 4 gigs of ram. I ordered 4 more (total of 8) – which I understand isn’t enough to power more than a few cores, but because I use cs3, I’ll need to limit the number of cores AE is using by using a text editor (which I don’t know how to do). Would you be able to help me with that?

  • Kevin Camp

    June 16, 2009 at 8:34 pm

    hi bret,

    there are two ways to set the number of cores in cs3…

    the hard way:

    find the ae preference file. it’s called ‘adobe after effects 8.0 prefs’ and it’s in users/username/library/adobe/after effects/8.0. right-click (or command-click) the file and choose to open it with text edit.
    choose edit>find>find… (or hit command-f) and type ‘MaxNumberOfProcesses’ and choose find next. where is says: “MaxNumberOfProcesses” = “0”, change the 0 to the number of cores that you want ae to be limited to. with 8gb of ram, some would say to set that to 2-3, but for sd projects, i think you’d be fine to set it to 4.

    the easy way:

    download this little script: aescripts.com/throttle-12/. then place it in applications/adobe after effects cs3/scripts/scriptui panels (you may need to create the folder called ‘ScriptUI Panels’). after that, open ae and you can choose window>throttle and set the number of cores in that panel. now you can make changes on the fly to multiprocessing and a handful of other useful settings.

    but you may be able to get ae to render your project now by disabling multiprocessing or some of the other things i suggested.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Bret Snyder

    June 16, 2009 at 8:48 pm

    I turned multiprocessing off and this is what happened:

    About 17 minutes into the rendering process, everything was just fine. The memory usage of AE was sitting at a dead-steady 1.83 gigs of ram. Around 20 minutes in, I glanced back at the activity monitor and noticed a big increase of memory usage up to 2.84 gigs and sure enough, it crashed seconds later. Is this kind of memory behavior normal even with multiprocessing turned off?

    I did a purge > all before that test. I haven’t tried 3 or 4 yet – going to now.

    What is an image buffer size error?

  • Kevin Camp

    June 16, 2009 at 9:30 pm

    [Bret Snyder] “Around 20 minutes in, I glanced back at the activity monitor and noticed a big increase of memory usage up to 2.84 gigs and sure enough, it crashed seconds later.”

    you might check and see what kind of effects/settings are happening right about that part of your comp. if it involves a third-party effect, you may be able to download an update that fixes that problem.

    using the secret pref to purge frames may help this… you may need to start the frame count from where the problem starts to where it crashes… so if you notice that the memory usage going crazy at frame 200, then crashing by frame 220, your purge value will be less than 20….

    [Bret Snyder] “What is an image buffer size error?”

    you’d get an error message say something like ‘unable to create 720×480 image buffer size’ the size can vary, it’s often much larger than 720×480. but by decreasing the ram cache that is used for rendering, you can increase the ram available for things like the image buffer and ram previews…

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Bret Snyder

    June 16, 2009 at 9:35 pm

    Using your purge idea, I’m about 10 minutes into this render and it’s taking about half of what is usually takes. Average of 500 megs of memory usage from AE, vs the usual 1.85 gigs.

    The composition is extremely simple, imo. This is what it is:

    background layer is a library (with 2 chairs) cg scene, which is just a jpg. I filmed two men sitting down having a converstaion in front of a green screen, which I keyed out (just the 2 men) and then applied a hue/sat modifier to decrase the brightness to -100. That’s it. Comp size is 320×240. I keyed them seperately from the same source file (2 layers) and positioned them in the chairs of the background scene. I am *completely* baffled that something which seems so simple, especially given the comp size, is requiring so much memory to render. But then again, I’m no video editing guru either. Maybe this is normal – I don’t know.

    One question I do have. Does comp length have anything to do with memory usage? Would a 5 minute comp take just as much memory as a 6 minute comp? Or does length make the memory usage vary?

  • Kevin Camp

    June 17, 2009 at 2:43 pm

    your comp does seem quite simple, and i have no idea why it would cause memory issues…. had you pre-rendered the keyed footage (applied your keying effects, then rendered then and brought them back into ae to composite with the rest of the scene)… i’m not saying that you should do that, but that may have helped here (i usually work this way, just because it makes the keyed footage so much easier to work with….).

    if you hadn’t pre-rendered it, what keying effect had you used? if it was keylight, the foundry had updated that effect since the version that shipped with cs3. you can download it here:

    https://www.thefoundry.co.uk/pkg_downloads.aspx?ui=A5FB8E97-D752-4E01-AC7D-17B39B7E1192

    you’ll want version 1.2v8 for intel macs (version 1.2v5 shipped with cs3).

    as far as the comp length and memory usage…. i suppose a longer comp would eventually use up more ram that a shorter comp if all other things were equal, but it really shouldn’t matter… ae should not fill up the ram completely. it is supposed to limit the cache size so that it never fills the ram and causes a crash, that’s what the maximum ram cache size is for in the memory & cache preference. as it hits that limit, ae begins clearing that cache to make more room for new frames and data. the ram usage should never get higher than that settings (by default it is 60%, so about 1.8gb — note, it should not be set higher than 60%). obviously, adobe has the secret pref because things can go wrong, but i honestly haven’t used it since version 7.

    glad things are working now. don’t forget to delete the purge value when you are done with this project, it should only be used when you have something like this happen.

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Bret Snyder

    June 17, 2009 at 3:37 pm

    The only other things to render with the scene aside from the 2 keylight layers are a background layer (jpg) and an audio layer (microphone). I wouldn’t think the addition of these 2 simple layers would honestly make the render perform much slower. But you’re the expert, so if you think I should be pre rendering the 2 key’d layers, I will.

    To do that, I just turn off the other 2 layers (there are 4 total) and then go to Pre Render? Then import that finished comp back into AE and render what would now be a quicktime file on top of my other 2 layers? Is that essentially what pre-rendering is?

    FWIW, I also updated keylight to the latest version from your link; thanks. I’ve gotta say – I’ve never seen a more helpful and responsive forum before. This is great. Thanks so much.

    Now, another person had said that keylight can bring even the beefiest machines to a slow grind and they thought the extra 4 gigs of ram coming in should really help. But I also understand, like you said, AE shouldn’t be consuming all of my memory when it renders.

    I’d rather not use the purging technique if I can avoid it because this comp will need to be created on a near weekly-basis. I’m just crossing my fingers here, hoping this extra ram will help me out.

  • Kevin Camp

    June 17, 2009 at 3:57 pm

    the easiest way to pre-render footage is to pre-comp the layers that you want to pre-render (select layers and choose layer>pre-compose… then choose to ‘move all attributes’ and open comp). then choose composition>pre-render. this will add the comp to the render queue and add 2 post render actions, import and replace usage, which will automatically import the footage and replace the pre-comp with the new rendered footage where ever the pre-comp was nested.

    it won’t delete the pre-comp, it will still be there in the project, so if you need to change anything you can just modify the pre-comp, then render it again with the same name, then reload that rendered footage (select the footage in the project window then choose file>reload footage).

    Kevin Camp
    Senior Designer
    KCPQ, KMYQ & KRCW

  • Bret Snyder

    June 18, 2009 at 9:46 pm

    The memory came in today. Tried it out with one keylight in the scene (one not rendered). Had 4 cores going with 8 gigs of memory. It rendered just fine. Had around 2.5 gigs of memory free by the time was render was done.

    Tried it with both people in the scene (2 layers using keylight). Ran outa memory. I wasn’t paying attention to the activity monitor. Tried another render, this time with 2 cores on. Ran out of memory again; however, Activity Monitor said it had 3 gigs of memory free to use at the time of the error message.

    Now, I’m actually receiving error messages (pop ups) that say:

    After Effects error: Keylight out of memory. (4)
    (25 :: 241)

    In all of my earlier tests with 4 gigs of memory, I wasn’t getting this error. It would just quit and the render status said Failed.

    I took a screenshot of the results below.

    I take it something more is wrong if AE is telling me I’m out of memory when I clearly have ~3 gigs left. 🙁

Page 1 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy