# Memory FS not updated on watch rebuild

**URL:** <https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053>\
**Category:** support\
**Created:** [April 6, 2017, 7:23am UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053 "2017-04-06T07:23:56Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 6, 2017, 7:23am UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/1 "2017-04-06T07:23:57Z")

</div>

Last day or so having issue where

1. Launch “hugo server”
2. Change some template or content
3. Hugo Reports rending the pages without error
4. Live reload refreshes the browser

but the last rendered changes do not appear.  
manual browser refresh doesn’t help  
using a different browser doesn’t help  
clearing the browser cache and manual refresh doesn’t help

If I break out of the hugo server watch, and restart Hugo server and refresh the browser the changes then appear.

Seems like the watch is doing it’s job and the pages are being rebuilt but the memory FS is not actually being updated.  
The memory FS is set correctly on the initial startup but not after any rebuild on changes forced by the watch code.

Any thoughts on why this is happing now but not a week ago. I have rebooted my machine (linux ubuntu) twice and the behavior persists.

---

<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 6, 2017, 10:05am UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/2 "2017-04-06T10:05:09Z")

</div>

What Hugoversion?

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 6, 2017, 2:21pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/3 "2017-04-06T14:21:41Z")

</div>

.18.1, ubuntu 16.04. Just realized it’s not up to date. I’ll put on .19 and try again.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 6, 2017, 2:35pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/4 "2017-04-06T14:35:18Z")

</div>

Ok, that fixed it. Can’t say why it started doing that since it was fine. Could the binary had gotten corrupted. Guess we’ll never know why.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 6, 2017, 2:58pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/5 "2017-04-06T14:58:18Z")

</div>

FYI with the version update it’s no longer taking painfully long to render and live refresh my build (elements were all loading slowly and thus my javascript window ready code was delayed and the page looking horrible while it was waiting).

So whatever was going on with my copy of .18.1 it’s much better now.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 6, 2017, 4:06pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/6 "2017-04-06T16:06:41Z")

</div>

@bep Maybe my issue was related to this. It was my homepage that was not updating and I recently changed my partial code to .Site.RegularPages. Was this resolved from .18 to .19. That would explain why it went away with change in version.

> **[\[SOLVED\] section list template not rendered (live reload maybe problem?)](https://discourse.gohugo.io/t/solved-section-list-template-not-rendered-live-reload-maybe-problem/5860/6)**
>
> I have only heard of this issue in relation to the homepage, and that was a while back and was easily worked around using .Data.Pages instead of .Site.Pages.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 10, 2017, 3:11pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/7 "2017-04-10T15:11:42Z")

</div>

@bep Nope still having memory FS issues.

Right now I am working a shortcode file in a theme.

I make a change to some html to be rendered while “hugo server” is running. The change is not reflected in the browser inspector

BUT if I then run Hugo and generate the corresponding public build and then look in the built file the change is there.

Even if I exit the hugo server/watcher and restart, refresh my browser, empty its cache the change is not reflected.

Bottom line…build to file system working…build to memory FS not working.

How can I track down what is happening.

Again using v0.19 on ubuntu 16.04

---

<div class="post-metadata">

**Author:** ![Hash\_Borgir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hash_borgir/32/6655_2.png) [@Hash\_Borgir](https://discourse.gohugo.io/u/Hash_Borgir)\
**Post date:** [April 10, 2017, 3:17pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/8 "2017-04-10T15:17:22Z")

</div>

I have the same problem. I simply just save the changes to my source again and live reload refreshes the page.

1. Make change.
2. Save change to disk.
3. Live reload should work, but it doesn’t.
4. Save changes to disk again.
5. Live reload magically refreshes the page it should have on the first save.

It’s rare that I have to re-run the hugo serve command again to see the changes, but sometimes that too.

This could be an underlying problem in the way Hugo implements live reload functionality.

The only times I have noticed this problem is when I make changes and save to disk too fast. For example, if I am working on a template file, I save my changes, live reload gets triggered, but then 1 second later I make another change and save again. Live reload triggers again.

I’m not sure but somewhere in multiple changes too fast and saving them causes this issue. Saving again makes it load again.

---

<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 10, 2017, 3:27pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/9 "2017-04-10T15:27:05Z")

</div>

It may be this issue:

[https://github.com/spf13/hugo/issues/3315](https://github.com/spf13/hugo/issues/3315)

I discovered it while writing a blog post about Hugo 0.20 earlier today. I suspected that I had screwed up something in 0.20, but this has to be from Hugo 0.18 – I just haven’t bumped into this until now. I will fix it, but now today …

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 10, 2017, 3:27pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/10 "2017-04-10T15:27:39Z")

</div>

saving again for me does nothing. The change is not reflected by anything I do currently.

BUT it seems to be something to do with the template files maybe?? because if I change a content file the md gets rendered but the template file (the shortcode in this case) is unchanged. As I think of when this happens it seems never to be with rendering the md content but with with something changing in the layouts folder like a template or a static file.

I’m pulling my hair out now because some javascript I’m editing (in a static file) can’t get a tag attribute but maybe it’s because my edits for that file are not getting into memory because I can not see any syntax error in something I have done many times.

Time to reboot to really be sure the memory is clear. I am not sure Hugo doesn’t keep using the same memory location on restart. The live reload is probably not the issue since I can clear browser cache and reload manually and still no changes.

---

<div class="post-metadata">

**Author:** ![Hash\_Borgir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hash_borgir/32/6655_2.png) [@Hash\_Borgir](https://discourse.gohugo.io/u/Hash_Borgir)\
**Post date:** [April 10, 2017, 3:29pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/11 "2017-04-10T15:29:40Z")

</div>

Well, let’s dig into the source and see what’s up.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 10, 2017, 3:31pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/12 "2017-04-10T15:31:19Z")

</div>

Does Hugo server still have the original setup as an option to put build in regular folder and serve from there? I’d like to do that now while this is resolved so I can keep working.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 10, 2017, 3:50pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/13 "2017-04-10T15:50:47Z")

</div>

disabled live reload, still happening.

I enabled a server on my public directory and I can keep going for now.

If I can provide some logging or other way to help track this down let me know.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 10, 2017, 3:53pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/14 "2017-04-10T15:53:55Z")

</div>

not the \_index.md issue. I am not using one.

---

<div class="post-metadata">

**Author:** ![dkebler](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/dkebler/32/7285_2.png) [@dkebler](https://discourse.gohugo.io/u/dkebler)\
**Post date:** [April 12, 2017, 7:29pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/15 "2017-04-12T19:29:39Z")

</div>

Just to keep reporting on this. The issue comes and goes. Currently it’s gone. (after much more coding and reboots)

Sometimes I suspect it’s my javascript code but I don’t see how that could be the cause especially when it persists after disabling live reload.

Sometimes I suspect it’s some bad template or shortcode that isn’t throwing any error but is somehow keeping the build from going into the memory FS. Like I said was able to just build manually to a directory and then fire up a server on that directory and keep working so that kinda seems to dismiss this notion.

So I suppose it’s going to be impossible for now to track this down because I can’t find the conditions to reproduce the issue. If I do I’ll make a new post to bug section.

---

<div class="post-metadata">

**Author:** ![Hash\_Borgir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/hash_borgir/32/6655_2.png) [@Hash\_Borgir](https://discourse.gohugo.io/u/Hash_Borgir)\
**Post date:** [April 16, 2017, 5:14pm UTC](https://discourse.gohugo.io/t/memory-fs-not-updated-on-watch-rebuild/6053/16 "2017-04-16T17:14:47Z")

</div>

I personally despise the in memory change update browser thingamigger. It’s annoying.

I only wish to see changes when I save the file. Otherwise the page constantly keeps updating and refreshing after EVERY SINGLE KEYSTROKE…

Good googa mooga that’s annoying.

I wonder if we can disable the in memory browser update thing on my end with a user setting? Can we already do this and I’m ignorant?

Anyway.
