# Out of memory with hugo 0.55

**URL:** <https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072>\
**Category:** support\
**Created:** [April 12, 2019, 10:02am UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072 "2019-04-12T10:02:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![brunoamaral](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/brunoamaral/32/21144_2.png) [@brunoamaral](https://discourse.gohugo.io/u/brunoamaral)\
**Post date:** [April 12, 2019, 10:02am UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/1 "2019-04-12T10:02:03Z")

</div>

I just noticed that my site now returns an out of memory error when I try to build it on the webserver’s side.

The log is available here:

> <https://gist.github.com/brunoamaral/4686ca9be417ed97b9a26077e70d2f82>

The server is running on Digital Ocean with 2GB of Memory

I am guessing the solution will probably be a server upgrade 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![norristh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/norristh/32/7542_2.png) [@norristh](https://discourse.gohugo.io/u/norristh)\
**Post date:** [April 19, 2019, 7:17am UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/2 "2019-04-19T07:17:51Z")

</div>

I have perhaps the same problem. I used 0.54 with no trouble in a virtual machine allocated 3GB of memory, with Firefox and some other GUI applications running. I never had problems with that.

0.55.0 didn’t work with my site (“invalid taxonomy state” panic), but the 0.55.2 bugfix release does work. However, with 0.55.2, I could barely build the site with 3GB of memory allocated to the VM. Sometimes it would fail with a similar out of memory panic as what you’re experiencing. When it worked, it might take 5 minutes to build.

I increased memory allocation to 6GB, and now 0.55.2 works, but it’s still slow. And that’s more memory than I want to give to this VM.

Anyone else finding 0.55.x to be very memory hungry?

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [April 19, 2019, 8:01am UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/3 "2019-04-19T08:01:15Z")

</div>

I have tests showing a more than 10% reduction in memory allocation and usage for general Hugo test building, but this of course depends on “what you use”. I may have introduced “something” in that release – which was not intended. I could have a look at it, but then I need to see a “prolbme site source”.

 ![](https://canada1.discourse-cdn.com/flex036/uploads/gohugo/original/2X/8/8251c0f65ce02be78170c7c6e74a0fab89feb79c.png)

The benchmark above compares 0.54 with 0.55 for a fairly common Hugo site with 5000 pages, shortcodes, tags etc. on my MacBook.

---

<div class="post-metadata">

**Author:** ![norristh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/norristh/32/7542_2.png) [@norristh](https://discourse.gohugo.io/u/norristh)\
**Post date:** [April 22, 2019, 6:44pm UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/4 "2019-04-22T18:44:59Z")

</div>

Our build on a gitlab shared runner fails sometimes with an out of memory fatal error/panic.

> **[Stop Fossil Fuels / website](https://gitlab.com/stop-fossil-fuels/website/)**
>
> GitLab.com

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [April 23, 2019, 9:08am UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/5 "2019-04-23T09:08:01Z")

</div>

I will track this issue in [https://github.com/gohugoio/hugo/issues/5890](https://github.com/gohugoio/hugo/issues/5890)

I have a suspect, but I will investigate. Thanks for the reports and the repo.

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [April 25, 2019, 9:56am UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/6 "2019-04-25T09:56:18Z")

</div>

> [@norristh](#):
>
> Our build on a gitlab shared runner fails sometimes with an out of memory fatal error/panic.

I’m pretty sure that the out of memory errors on your site should be fixed in Hugo 0.55.4 (just out). And on my MacBook it also builds about twice as fast …

@brunoamaral I have not checked your site, but if it’s a multilingual site, the reason is probably the same.

---

<div class="post-metadata">

**Author:** ![norristh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/norristh/32/7542_2.png) [@norristh](https://discourse.gohugo.io/u/norristh)\
**Post date:** [April 25, 2019, 9:15pm UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/7 "2019-04-25T21:15:28Z")

</div>

> [@bep](#):
>
> I’m pretty sure that the out of memory errors on your site should be fixed in Hugo 0.55.4 (just out)

Yes indeed! You’re awesome!

I’m happy to have the Table of Contents listing all headers now, thanks to your shortcode handling improvement. Thanks so much for all your work on this valuable tool!

---

<div class="post-metadata">

**Author:** ![brunoamaral](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/brunoamaral/32/21144_2.png) [@brunoamaral](https://discourse.gohugo.io/u/brunoamaral)\
**Post date:** [April 26, 2019, 9:33am UTC](https://discourse.gohugo.io/t/out-of-memory-with-hugo-0-55/18072/8 "2019-04-26T09:33:19Z")

</div>

I have also checked and everything is working fine. Thank you @bep !
