I had the same timeout, but I had problems to implement the suggested solution, so I’d like to add some details.
First, I had some trouble to find /var/discourse/templates
, because my Discourse installation is in a non-standard location. I was looking inside Docker, which of course makes no sense.
Second, line number 159 is no longer correct. I assume you are referring to this section of template.yml
:
- exec:
cd: $home
hook: yarn
cmd:
- |-
if [ "$version" != "tests-passed" ]; then
rm -rf app/assets/javascripts/node_modules
fi
- su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
Third, I am not very familiar with yaml, pups and yarn or how these are used in Discourse, and I didn’t want to guess. Instead, I tried this change to the original section:
- exec:
cd: $home
hook: yarn
cmd:
- |-
if [ "$version" != "tests-passed" ]; then
rm -rf app/assets/javascripts/node_modules
fi
- su discourse -c 'yarn config set network-timeout 600000 -g && yarn install --frozen-lockfile && yarn cache clean'
This works for me. ./launcher rebuild app
now takes a very long time (more than 2 hours for me), but at least it runs to completion, and the forum works again.
Finally, I’d like to add that this issue (for me) was certainly not a lack of memory: I am using a VPS with 32GB installed, of which 24GB were free when the problem occurred.