2

Note: This is my first post, so if my title is not appropriate, please let me know what an alternative could be for more relevant answers :)

I am rendering a scene for someone(so no way for me to optimize the scene or anything like that) and I'm running into an issue where blender seems to be running out of memory and becomes unresponsive.

As a countermeasure I have started using the console, and this seems to be marginally more effective, I can render about 4 frames before the subsequent render just starts hanging.

When I use the command:

blender -b "path/to/blendfile" -s 50 -e 55

I get this error response immediately: enter image description here

My workaround has been to render each frame individually using this command:

blender -b "path/to/blendfile" -f 50

This has been effective for about 4 frames, after which doing frame 55, the process just hangs and I need to restart my pc to be able to do 4 more frames again.

enter image description here

My question is, is there a way(perhaps a command) to free up memory blocks after every 4th frame or so, to prevent the need to restart my pc each time?

Some PC & Memory Specifications: OS: Windows 10

RAM: 16GB

GPU: RTX 3070 Ti

CPU: Ryzen 5 2600x

The usage statistics at the point of the render hanging: enter image description here

  • It might be helpful to know: what OS are you using, and how much RAM does the machine have in total/what else is using RAM, and how much (to determine if, e.g., is it a single especially expensive frame exhausting RAM, or is the memory just not being collected in between each cmd line invocation of Blender)? – NeverConvex Sep 03 '21 at 10:23
  • 1
    @NeverConvex I'll update the question with the requested info thanks. – Albertus Brand Venter Sep 03 '21 at 10:28
  • Also: how are you doing blender -b "path/to/blendfile" -f 50 currently? Are you manually invoking this from command line yourself for each frame, or did you write a small bash-or-powershell script to loop over calling Blender on each individual frame? – NeverConvex Sep 03 '21 at 10:31
  • @NeverConvex I do this manually each time. Since it hangs, I don't think I should try to automate the script execution just yet – Albertus Brand Venter Sep 03 '21 at 10:33
  • Thanks! If you're invoking manually, I'm surprised the memory blocks are never freed. I wonder if the Blender processes are not actually closing properly, and maybe forcibly terminating them would cause the memory to be freed? I also notice someone asked a similar question in https://blender.stackexchange.com/questions/158191/cannot-render-frames-from-command-line-powershell. The discussion there seems to suggest that a slight variation on the command line arguments didn't fix the error, but did generate (all?) the output files, so might try that – NeverConvex Sep 03 '21 at 10:42
  • @NeverConvex Yeah, my thought aswell, which is why my question is asking for a way to explicitly free up memory, I saw that link you posted, however in this case it does not help me much, since the error is not the issue, rather the fact that the process just starts hanging is. – Albertus Brand Venter Sep 03 '21 at 10:51

0 Answers0