Showing results for 
Search instead for 
Did you mean: 

Blender Discussions

Adept I
Adept I

How to stop memory leak in animation rendering?

While rendering animations after each frame the memory usage jumps drastically. After 3 frames it is using 100% of 32G RAM.

3 Replies

Re: How to stop memory leak in animation rendering?

Now developers working with this issue. Please, share your system specs: System\CPU\XXRAM\GPU. Thank you

0 Kudos
Adept I
Adept I

Re: How to stop memory leak in animation rendering?

To anybody having this problem a workaround is using a script to render each frame independent. I did not write the script, see credit at bottom.

import bpy
import time
import os

scene = bpy.context.scene #variable that fetches current scene
outputDir = scene.render.filepath #variable that fetches output directory
filext = scene.render.file_extension #file extension suffix

for frame in range(scene.frame_start, scene.frame_end + 1): #note "frame" is just a variable
filepath = os.path.join(outputDir, str(frame).zfill(4)) #variable for file checker

if os.path.isfile(filepath + filext):
print('File exists, skipping to next...')
scene.render.filepath = filepath
time.sleep(3) #wait time in seconds after each frame render, inscreasce if there are dependency/driver related errors

scene.render.filepath = outputDir


#The name of files will always be frame number (eg. 0000.jpg), Its recommended to separate different takes/versions by folders
#This script will use Output settings that you have defined in Properties tab
#Original script by John October Rage
#Improved by Alumx (with assistence of Bobbe)

0 Kudos
Journeyman III
Journeyman III

Re: How to stop memory leak in animation rendering?

Hi there, we're also experiencing a pretty obstructive problem rendering using provender and it appears to be a memory leak, its caused kernel panics pretty much every time we've tried to do an animation render. It seems there is data accumulating between each frame, even if just doing single frames so I would hope that the script being promoted works, but if its not closing the process of blender that is rendering, I have my doubts.

Anyway, since we're using blender, I have attached the system-info.txt as generated by blender which contains all our system info. As a summary, I am using a MacBook pro with a Razor core X eGPU enclosure, running an AMD5700XT card. I have used purge wrangler to setup the OS to use the eGPU, all of this works fine for other applications. Blender can see the 5700XT and render using it in prorender without issue, asides from the RAM leak.

It would be great if someone can get back to us as we're reviewing this setup for a youtube channel, we'd love to hold off until we know what's the deal with AMD's development regarding this issue as it is a showstopper, however, we can't hold publishing forever, so please! Someone get back to us.

We can be contacted at info at crowdrender dot com dot au


0 Kudos