How to track and reduce hugo memory usage on build (getting OOM)

I have a site with 500k+ pages. Currently I use docsy. The last few months it keeps getting out of memory on build. I currently build on my desktop with 64 GB of RAM.

I tried to use the older version and the last successful build is with version 0.105

I suspect this is related to code embedded in pages (sorry I forgot what was my findings so I came to this hypothesis few months back).

My question is how to track /identify the memory usage so I can make improvement on the problematic part?

Thank you

Have you already tested hugo --printMemoryUsage?

bep has been working on the “million page” release for some time, must be a hard nut to crack.

1 Like