Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify that running main requires more than 2G of RAM, unlike versioned releases #22298

Open
ebecaf opened this issue Jun 23, 2022 · 12 comments

Comments

@ebecaf
Copy link

ebecaf commented Jun 23, 2022

Hi,

I have had a look at the other 4.x to 5.x update issues but they don't seem to apply.

I get:

Error running a subcommand of ./tools/update-prod-static: ./tools/webpack --quiet
Actual error output for the subcommand is just above this.
upgrade-zulip-stage-2: Failed to build static assets.
Zulip upgrade failed (exit code 1)!

Here is what is above the --quiet in the logs:

[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "swagger-parser > @apidevtools/swagger-parser@10.0.3" has unmet peer dependency "openapi-type>
[4/4] Building fresh packages...
warning Ignored scripts due to flag.
Done in 26.04s.
Using cached node modules from /srv/zulip-npm-cache/123456789/node_mod>
+ ./tools/setup/emoji/build_emoji
build_emoji: Using cached emojis from /srv/zulip-emoji-cache/123456789>
+ ./scripts/setup/inline_email_css.py
+ ./tools/setup/generate_zulip_bots_static_files.py
+ ./tools/setup/build_pygments_data
+ ./tools/setup/build_timezone_values
+ ./tools/webpack --quiet

I assume it has something to do with;

warning "swagger-parser > @apidevtools/swagger-parser@10.0.3" has unmet peer dependency

Ubuntu 20
PostgreSQL 14.1
Zulip 4.11 (obviously :) )

Thanks for your help

@andersk
Copy link
Member

andersk commented Jun 24, 2022

No, the swagger-parser warning is harmless. I think this is what happens when webpack runs out of RAM. Try adding more RAM or swap, or install using the tarball (which has pre-built webpack bundles) rather than Git.

@ebecaf
Copy link
Author

ebecaf commented Jun 24, 2022

No, the swagger-parser warning is harmless. I think this is what happens when webpack runs out of RAM. Try adding more RAM or swap, or install using the tarball (which has pre-built webpack bundles) rather than Git.

Will try that, thank you

@ebecaf ebecaf closed this as not planned Won't fix, can't repro, duplicate, stale Jun 24, 2022
@ebecaf ebecaf reopened this Jun 24, 2022
@zulipbot
Copy link
Member

Hello @zulip/server-production members, this issue was labeled with the "area: production installer" label, so you may want to check it out!

@timabbott
Copy link
Sponsor Member

@ebecaf were you able to complete this upgrade? I figure we should close the issue to clean up the tracker if so.

@alexmv
Copy link
Collaborator

alexmv commented Oct 3, 2022

I'm resolving this issue due to lack of response -- please re-open if you're still seeing an issue.

@alexmv alexmv closed this as completed Oct 3, 2022
@oyale
Copy link

oyale commented Oct 18, 2022

I am writing to confirm that we encountered the same problem (when upgrading the server using /home/zulip/deployments/current/scripts/upgrade-zulip-from-git main, as we are migrating from the cloud) and that it was indeed due to the machine not having enough RAM.

Maybe it is worth adding it to the documentation?

Thanks to everyone!

@alexmv
Copy link
Collaborator

alexmv commented Oct 18, 2022

How much RAM did you have before, and what version were you upgrading to main from?

@oyale
Copy link

oyale commented Oct 19, 2022

We were running it on a 2 GB CX11 Hetzner's machine. Switching to a 4 GB's CX21 was enough to run the upgrade smoothly.

I didn't catch the exact patch, but it was a v5.6, the one provided by the latest installer (using this Ansible role).

@alexmv
Copy link
Collaborator

alexmv commented Oct 19, 2022

I believe this to be because when building from main, you need to have enough memory to run webpack, which has started requiring more than 2G of RAM. The pre-packaged releases with version numbers have the webpack output pre-generated and bundled in them.

The action here is likely to better document that the memory requirements for main are higher than those for versioned releases. @oyale and @ebecaf, when planning to upgrade to main, did you read https://zulip.readthedocs.io/en/latest/production/upgrade-or-modify.html#upgrading-from-a-git-repository -- such that if we added a note about expanded memory requirements in main there, you'd have seen it?

@alexmv alexmv reopened this Oct 19, 2022
@alexmv alexmv changed the title Issue updating from 4.11 to 5.0 or 5.1 Clarify that running main requires more than 2G of RAM, unlike versioned releases Oct 19, 2022
@alexmv
Copy link
Collaborator

alexmv commented Oct 19, 2022

We do say, in the "requirements and scalability" section of a different page:

  • At least 2 GB RAM, and 10 GB disk space
    • If you expect 100+ users: 4 GB RAM, and 2 CPUs
    • If you intend to upgrade from Git: 3 GB RAM, or 2G and at least 1G of swap configured.

But that can be easily missed if one was on a release when it was first alled.

@oyale
Copy link

oyale commented Oct 24, 2022

Yeah, I've seen it in the requirements section just after writing this issue, sorry.

We have indeed read the section Upgrading from a Git repository, following the link in the section Importing to a new Zulip server.

@timabbott
Copy link
Sponsor Member

@alexmv do you have an idea for where we might update documentation, or should we close this?

(I suppose another idea could be to have a check in the upgrade tool)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants