FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

Rebuild failure: "extconf failed, exit code 1" -- due to old Docker?

I’m getting this too, and now our forum is offline :thinking:

1 Like

Do you have a very old Docker version?

Can you run ./launcher start app

To restart?

1 Like

Ok, we’re back online now. Our Ubuntu system was fully up-to-date but for some reason the Docker version was years old still.

Runnning ./launcher start app didn’t help. The only thing that fixed it was /var/discourse/discourse_doctor but when I ran it my SSH session froze. Another maintainer ran it and it succeeded and solved the problem. :man_shrugging:

Apparently it ran out of memory:

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

I’m not sure why it should take more than 2 GB of RAM to run/compile (?) JS…? Any chance it could be made leaner?

1 Like

I’ve seen a fair bit of rebuilds failing even on 8GB RAM where a SWAP was not configured. If this server doesn’t have swap, it might be worth setting up a 2GB swap then rebuilding again.

2 Likes

We already had swap space configured.

1 Like

There have been a few reports of JavaScript heap out of memory recently, and a change has been made to account for it (all being well :crossed_fingers: :slight_smile:)

I don’t think your issue is the same as the one in the OP so I’ll split this off into a new topic. :+1:

7 Likes