Update from 3.0.0.beta16 to 3.1.0.beta2

What does free tell you?

Personally, if a backup failed, I would not try an update. A backup - including having a copy downloaded - is for me a prerequisite. This may not be a helpful comment at this time, but I think it has to be said.


In your other post you give a little more info about the rake aborted:


That’s not the problem. That looks like there isn’t a key to download max mind db. The problem is above.

1 Like

If the problem is a failure to spawn, then not only do we care about RAM and swap usage, but we care about the kernel configuration. If this appears in the logs

# WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

then it’s worth doing as advised. See also

My installation of Discourse is very generic. After a reboot I got a clean backup. So, ultimately I decided to do a from scratch installation. The installation failed with the same errors I posted above. I have been running Discourse with 6GB of memory in a LXD container the past four years with no issues. The memory utilization is steady at 1.9GB. During an upgrade, the memory peaks out at 5.1GB. My database backup is only 30GB of data and so my installation is small as compared with others. My configuration is running on Ubuntu 22.04. Should I be on another distro?

I have maybe 40 users and 150 posts. The system uses 1.8GB of memory and I gave it 6GB of memory. How much memory is required to have a rebuild work? That’s always been adequate in the past.

I do not use any plugins.

Can you share your app.yml file? I’m afraid you have an invalid API key for MaxMind.

1 Like

Here’s my app.yml.

## this is the all-in-one, standalone Discourse Docker container template
## After making changes to this file, you MUST rebuild
## /var/discourse/launcher rebuild app
## visit http://www.yamllint.com/ to validate this file as needed

  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  - "templates/web.letsencrypt.ssl.template.yml"

## which TCP/IP ports should this container expose?
## If you want Discourse to share a port with another webserver like Apache or nginx,
## see https://meta.discourse.org/t/17247 for details
  - "80:80"   # http
  - "443:443" # https

  db_default_text_search_config: "pg_catalog.english"

  ## Set db_shared_buffers to a max of 25% of the total memory.
  ## will be set automatically by bootstrap based on detected RAM, or you can override
  db_shared_buffers: "4096MB"

  ## can improve sorting performance, but adds memory usage per-connection
  #db_work_mem: "40MB"

  ## Which Git revision should this container use? (default: tests-passed)
  #version: tests-passed

  LC_ALL: en_US.UTF-8
  LANG: en_US.UTF-8

  ## How many concurrent web requests are supported? Depends on memory and CPU cores.
  ## will be set automatically by bootstrap based on detected CPUs, or you can override

  ## TODO: The domain name this Discourse instance will respond to
  ## Required. Discourse will not work with a bare IP number.
  DISCOURSE_HOSTNAME: discussion.scottibyte.com

  ## Uncomment if you want the container to be started with the same
  ## hostname (-h option) as specified above (default "$hostname-$config")

  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: 'aaaaaa@gmail.com'

  ## TODO: The SMTP mail server used to validate new accounts and send notifications
  # SMTP ADDRESS, username, and password are required
  # WARNING the char '#' in SMTP password can cause problems!
  DISCOURSE_SMTP_ADDRESS: smtp.gmail.com
  DISCOURSE_SMTP_ENABLE_START_TLS: true           # (optional, default true)
  DISCOURSE_SMTP_DOMAIN: discussion.scottibyte.com
  DISCOURSE_NOTIFICATION_EMAIL: noreply@scottibyte.com

  ## If you added the Lets Encrypt template, uncomment below to get a free SSL certificate

  ## The http or https CDN address for this Discourse instance (configured to pull)
  ## see https://meta.discourse.org/t/14857 for details
  #DISCOURSE_CDN_URL: https://discourse-cdn.example.com
  ## The maxmind geolocation IP address key for IP address lookup
  ## see https://meta.discourse.org/t/-/137387/23 for details

## The Docker container is stateless; all data is stored in /shared
  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

## Plugins go here
## see https://meta.discourse.org/t/19157 for details
    - exec:
        cd: $home/plugins
          - git clone https://github.com/discourse/docker_manager.git

## Any custom commands to run after building
  - exec: echo "Beginning of custom commands"
  ## If you want to set the 'From' email address for your first registration, uncomment and change:
  ## After getting the first signup email, re-comment the line. It only needs to run once.
  # - exec: rails r "SiteSetting.notification_email='info@unconfigured.discourse.org'"
  - exec: echo "End of custom commands"

When I did a new build, I tried a new Maxmind key and I got the same error.

Delete or comment out the line with DISCOURSE_MAXMIND_LICENSE_KEY and rebuild.

1 Like

Oh and if it helps. Everything is running fine now. Updates are what are breaking.

Commented out the Maxmind key in the YAML. Rebuild is underway. By the way, email notifications have always worked fine. Lately the email for the backup download link no longer works. I simply go to the folder and download the backup via sftp and that works and the backup log completes successfully. So, what do you think the issue with the Maxmind key is?

@Falco Well apparently the Maxmind key was the culprit.

As you can see, the rebuild worked and the forum is at the latest build. Taking a new backup worked from the GUI as did the backup notification and even the backup download link. Everything works fine.
Thanks, you are the master! Great comments and wonderful help sir.

So, even with a new Maxmind key, I had no luck. Any advice on that?


So an invalid key will break the build but a null key will not?


Ideally neither will, just need confirmation of what exactly is broken with proper reproduction steps so we can file a but and assign an engineer to fix it.


All I did was to comment the key out and the rebuild worked perfectly. With a valid (and even new key) the build fails with the logs that I have provided.

1 Like

I find it quite disturbing that your backup failed. I wouldn’t expect a misconfigured IP geolocating service would get in the way of that.

I have the same problem, it seems to be the key problem of maxmind

It absolutely was. I disabled Mastermind and all was well.

1 Like