Found 0GB of memory and 1 physical CPU cores HOW?

unsupported-install

(Tumi) #1

Before setup installation discourse (like smtp , domain) i get a comunicat:

Found 0GB of memory and 1 physical CPU cores
setting db_shared_buffers = 0MB
setting UNICORN_WORKERS = 0
containers/app.yml memory parameters updated.

How it possible if i have got 1gb ram and 1vcpu ? What it mean


UTC [83] FATAL: configuration file “/etc/postgresql/9.5/main/postgresql.conf” contains errors
UTC [83] FATAL: configuration file “/etc/postgresql/9.5/main/postgresql.conf” contains errors
(Jay Pfaffman) #2

You’ve asked a new question. Does that mean that you solved this problem? If so, it’d be nice if you’d update your post.

It’s rounding to the nearest GB, so my guess is that you have less than 1GB of ram (e.g., 512MB). That’s not enough RAM.


(Jeff Atwood) #3

Hmm @pfaffman we might want protection for that.


(Jay Pfaffman) #4

Yeah. It should have refused to install with that little team memory.


(Rafael dos Santos Silva) #5

I believe it does :thinking::


(Tumi) #6

My serwer should got a 1Gb RAM so why it look like this ?
Untitled


(Jay Pfaffman) #7

You should ask the people who said you had 1gb. You just showed that you don’t have 1gb.

You have less than 1gb. Disourse-setup did exactly as it was supposed to until you broke it.


(Tumi) #8

Hmn i just create a virtual machine on azure . So how it possible to create less memory than i should got? When i delete it and create again its the same . So why this microsoft super company laying ? How should I understand that . Fraud from them ??


(Jay Pfaffman) #9

What instance are you using? According to Pricing - Cloud Services | Microsoft Azure , the A0 has .75GB. I don’t see anything on that page claiming that there is a 1GB option.


(Tumi) #10

this is b1s free instance ;]


(Stephen) #11

Regardless of what Microsoft says in their promotional material, you’ve proven that your server doesn’t have 1GB, it’s only reporting 908Mb.

At this stage you’re trying to stuff a square peg in a round hole, asking how you can break the installer to ‘fix’ the install. If the team thought Discourse ran effectively on less than 1GB you would be able to install it without mangling their code.

Hard to call it fraud when you’re not paying. Creative marketing at best.


(Tumi) #12

Ok but pls tell me why while instalation i got only Fatal error (not about memory)

> 2017-12-22 16:20:46.672 UTC [42] FATAL: configuration file "/etc/postgresql/9.5/main/postgresql.conf" contains errors

Intentional misleading is marketing? Pff. Free? Like Facebook is free. My person are not “free” .I dont Paid but i was agreed regulations etc.marketing can not be misleading. It’s illegal in UE. end of story.


(Tumi) #13

Hello . I was think its all ok and i was mega happy but NO , not yet :smiley:

This is from terminal:

> Already up-to-date.
> I, [2017-12-22T13:00:12.317668 #13]  INFO -- : Loading --stdin
> I, [2017-12-22T13:00:12.323458 #13]  INFO -- : > mkdir -p /shared/postgres_run
> I, [2017-12-22T13:00:12.336627 #13]  INFO -- :
> I, [2017-12-22T13:00:12.337106 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run
> I, [2017-12-22T13:00:12.386537 #13]  INFO -- :
> I, [2017-12-22T13:00:12.387049 #13]  INFO -- : > chmod 775 /shared/postgres_run
> I, [2017-12-22T13:00:12.389418 #13]  INFO -- :
> I, [2017-12-22T13:00:12.389737 #13]  INFO -- : > rm -fr /var/run/postgresql
> I, [2017-12-22T13:00:12.392340 #13]  INFO -- :
> I, [2017-12-22T13:00:12.392679 #13]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
> I, [2017-12-22T13:00:12.437103 #13]  INFO -- :
> I, [2017-12-22T13:00:12.437499 #13]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running     stop container ; exit 1
> 2017/12/22 13:00:12 socat[21] E connect(6, AF=1 "/shared/postgres_run/.s.PGSQL.5432", 36): No such file or directory
> I, [2017-12-22T13:00:13.035452 #13]  INFO -- :
> I, [2017-12-22T13:00:13.036017 #13]  INFO -- : > rm -fr /shared/postgres_run/.s*
> I, [2017-12-22T13:00:13.038472 #13]  INFO -- :
> I, [2017-12-22T13:00:13.038949 #13]  INFO -- : > rm -fr /shared/postgres_run/*.pid
> I, [2017-12-22T13:00:13.040694 #13]  INFO -- :
> I, [2017-12-22T13:00:13.041019 #13]  INFO -- : > mkdir -p /shared/postgres_run/9.5-main.pg_stat_tmp
> I, [2017-12-22T13:00:13.042900 #13]  INFO -- :
> I, [2017-12-22T13:00:13.043268 #13]  INFO -- : > chown postgres:postgres /shared/postgres_run/9.5-main.pg_stat_tmp
> I, [2017-12-22T13:00:13.044726 #13]  INFO -- :
> I, [2017-12-22T13:00:13.047651 #13]  INFO -- : File > /etc/service/postgres/run  chmod: +x
> I, [2017-12-22T13:00:13.050449 #13]  INFO -- : File > /etc/runit/3.d/99-postgres  chmod: +x
> I, [2017-12-22T13:00:13.053097 #13]  INFO -- : File > /root/upgrade_postgres  chmod: +x
> I, [2017-12-22T13:00:13.053607 #13]  INFO -- : > chown -R root /var/lib/postgresql/9.5/main
> I, [2017-12-22T13:00:46.807963 #13]  INFO -- :
> I, [2017-12-22T13:00:46.808667 #13]  INFO -- : > [ ! -e /shared/postgres_data ] && install -d -m 0755 -o postgres -g postgres /shared/postgres_data && sudo     -E -u postgres /usr/lib/postgresql/9.5/bin/initdb -D /shared/postgres_data || exit 0
> 
> WARNING: enabling "trust" authentication for local connections
> You can change this by editing pg_hba.conf or using the option -A, or
> --auth-local and --auth-host, the next time you run initdb.
> I, [2017-12-22T13:01:09.907790 #13]  INFO -- : The files belonging to this database system will be owned by user "postgres".
> This user must also own the server process.
> 
> The database cluster will be initialized with locale "en_US.UTF-8".
> The default database encoding has accordingly been set to "UTF8".
> The default text search configuration will be set to "english".
> 
> Data page checksums are disabled.
> 
> fixing permissions on existing directory /shared/postgres_data ... ok
> creating subdirectories ... ok
> selecting default max_connections ... 100
> selecting default shared_buffers ... 128MB
> selecting dynamic shared memory implementation ... posix
> creating configuration files ... ok
> creating template1 database in /shared/postgres_data/base/1 ... ok
> initializing pg_authid ... ok
> initializing dependencies ... ok
> creating system views ... ok
> loading system objects' descriptions ... ok
> creating collations ... ok
> creating conversions ... ok
> creating dictionaries ... ok
> setting privileges on built-in objects ... ok
> creating information schema ... ok
> loading PL/pgSQL server-side language ... ok
> vacuuming database template1 ... ok
> copying template1 to template0 ... ok
> copying template1 to postgres ... ok
> syncing data to disk ... ok
> 
> Success. You can now start the database server using:
> 
>     /usr/lib/postgresql/9.5/bin/pg_ctl -D /shared/postgres_data -l logfile start
> 
> 
> I, [2017-12-22T13:01:09.908294 #13]  INFO -- : > chown -R postgres:postgres /shared/postgres_data
> I, [2017-12-22T13:01:09.913023 #13]  INFO -- :
> I, [2017-12-22T13:01:09.913294 #13]  INFO -- : > chown -R postgres:postgres /var/run/postgresql
> I, [2017-12-22T13:01:09.914904 #13]  INFO -- :
> I, [2017-12-22T13:01:09.915405 #13]  INFO -- : > /root/upgrade_postgres
> I, [2017-12-22T13:01:09.922011 #13]  INFO -- :
> I, [2017-12-22T13:01:09.922148 #13]  INFO -- : > rm /root/upgrade_postgres
> I, [2017-12-22T13:01:09.923561 #13]  INFO -- :
> I, [2017-12-22T13:01:09.935796 #13]  INFO -- : Replacing data_directory = '/var/lib/postgresql/9.5/main' with data_directory = '/shared/postgres_data' in /e    tc/postgresql/9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.936458 #13]  INFO -- : Replacing (?-mix:#?listen_addresses *=.*) with listen_addresses = '*' in /etc/postgresql/9.5/main/postgresql.    conf
> I, [2017-12-22T13:01:09.937059 #13]  INFO -- : Replacing (?-mix:#?synchronous_commit *=.*) with synchronous_commit = $db_synchronous_commit in /etc/postgres    ql/9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.937693 #13]  INFO -- : Replacing (?-mix:#?shared_buffers *=.*) with shared_buffers = $db_shared_buffers in /etc/postgresql/9.5/main/    postgresql.conf
> I, [2017-12-22T13:01:09.938139 #13]  INFO -- : Replacing (?-mix:#?work_mem *=.*) with work_mem = $db_work_mem in /etc/postgresql/9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.938725 #13]  INFO -- : Replacing (?-mix:#?default_text_search_config *=.*) with default_text_search_config = '$db_default_text_searc    h_config' in /etc/postgresql/9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.939137 #13]  INFO -- : > install -d -m 0755 -o postgres -g postgres /shared/postgres_backup
> I, [2017-12-22T13:01:09.940865 #13]  INFO -- :
> I, [2017-12-22T13:01:09.941298 #13]  INFO -- : Replacing (?-mix:#?max_wal_senders *=.*) with max_wal_senders = $db_max_wal_senders in /etc/postgresql/9.5/ma    in/postgresql.conf
> I, [2017-12-22T13:01:09.985283 #13]  INFO -- : Replacing (?-mix:#?wal_level *=.*) with wal_level = $db_wal_level in /etc/postgresql/9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.985867 #13]  INFO -- : Replacing (?-mix:#?checkpoint_segments *=.*) with checkpoint_segments = $db_checkpoint_segments in /etc/postg    resql/9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.986271 #13]  INFO -- : Replacing (?-mix:#?logging_collector *=.*) with logging_collector = $db_logging_collector in /etc/postgresql/    9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.987022 #13]  INFO -- : Replacing (?-mix:#?log_min_duration_statement *=.*) with log_min_duration_statement = $db_log_min_duration_st    atement in /etc/postgresql/9.5/main/postgresql.conf
> I, [2017-12-22T13:01:09.987708 #13]  INFO -- : Replacing (?-mix:^#local +replication +postgres +peer$) with local replication postgres  peer in /etc/postgre    sql/9.5/main/pg_hba.conf
> I, [2017-12-22T13:01:09.988084 #13]  INFO -- : Replacing (?-mix:^host.*all.*all.*127.*$) with host all all 0.0.0.0/0 md5 in /etc/postgresql/9.5/main/pg_hba.    conf
> I, [2017-12-22T13:01:09.988661 #13]  INFO -- : > HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-ce    rt /usr/lib/postgresql/9.5/bin/postmaster -D /etc/postgresql/9.5/main
> I, [2017-12-22T13:01:09.990125 #13]  INFO -- : > sleep 5
> LOG:  0 is outside the valid range for parameter "shared_buffers" (16 .. 1073741823)
> 2017-12-22 13:01:10.049 UTC [83] FATAL:  configuration file "/etc/postgresql/9.5/main/postgresql.conf" contains errors
> I, [2017-12-22T13:01:15.040397 #13]  INFO -- :
> I, [2017-12-22T13:01:15.040609 #13]  INFO -- : > su postgres -c 'createdb discourse' || true
> createdb: could not connect to database template1: could not connect to server: No such file or directory
>         Is the server running locally and accepting
>         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
> I, [2017-12-22T13:01:15.841364 #13]  INFO -- :
> I, [2017-12-22T13:01:15.841746 #13]  INFO -- : > su postgres -c 'psql discourse -c "create user discourse;"' || true
> psql: could not connect to server: No such file or directory
>         Is the server running locally and accepting
>         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
> I, [2017-12-22T13:01:16.236829 #13]  INFO -- :
> I, [2017-12-22T13:01:16.237220 #13]  INFO -- : > su postgres -c 'psql discourse -c "grant all privileges on database discourse to discourse;"' || true
> psql: could not connect to server: No such file or directory
>         Is the server running locally and accepting
>         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
> I, [2017-12-22T13:01:16.285438 #13]  INFO -- :
> I, [2017-12-22T13:01:16.285877 #13]  INFO -- : > su postgres -c 'psql discourse -c "alter schema public owner to discourse;"'
> psql: could not connect to server: No such file or directory
>         Is the server running locally and accepting
>         connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
> I, [2017-12-22T13:01:16.333852 #13]  INFO -- :
> I, [2017-12-22T13:01:16.334299 #13]  INFO -- : Terminating async processes
> 
> 
> FAILED
> --------------------
> Pups::ExecError: su postgres -c 'psql discourse -c "alter schema public owner to discourse;"' failed with return #<Process::Status: pid 109 exit 2>
> Location of failure: /pups/lib/pups/exec_command.rb:108:in `spawn'
> exec failed with the params "su postgres -c 'psql $db_name -c \"alter schema public owner to $db_user;\"'"
> ba599d5a146a5773965191aea5bae886b3b9dca2afe21f165c5faec664b0ca9d
> ** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

(Stephen Chung) #14

Obviously the script seems to think you have zero RAM, so it sets the database’s buffer size to zero.

Perhaps the script needs to work with floating point numbers here…


(Stephen Chung) #15

Don’t forget that in a typical PC architecture, there are other things like video RAM and other shadow RAM sections that are sometimes mapped to physical RAM, so you lose part of the physical RAM due to these things. Since it is a free tier, I suppose Azure is just using the 1GB RAM as much as it can without giving you more?

My 3.5GiB VM instance reports 3.3GiB total physical memory, losing around 120MiB - which is almost EXACTLY the amount that you lose.

EDIT: See also 14.04 - Why does the system report 7.7Gb of total Ram when I installed 8Gb? - Ask Ubuntu