• RoundSparrowOP
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    2 years ago

    On Back end: I’m still running into the same problem as 2 other people have reported, the log file shows:

    thread 'main' panicked at 'Couldn't run DB Migrations', crates/db_schema/src/utils.rs:165:25

    I did try the drop table and create table you posted on Reddit thread, didn’t help, always runs into DB Migrations failure on attempt to start lemmy_server

    • cablepick@lemmy.cablepick.net
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      2 years ago

      Try this:
      sudo -iu postgres psql -c "ALTER USER lemmy WITH SUPERUSER;"

      You might need to dump the DB before restarting lemmy_server
      sudo -iu postgres psql -c "DROP DATABASE lemmy;"
      sudo -iu postgres psql -c "CREATE DATABASE lemmy WITH OWNER lemmy ENCODING 'UTF8' TEMPLATE template0 LC_COLLATE 'C' LC_CTYPE 'C';"

      • RoundSparrowOP
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        2 years ago

        sudo -iu postgres psql -c “ALTER USER lemmy WITH SUPERUSER;”

        Ok, that seems to have helped!
        curl localhost:8536/api/v3/site now works!

        • cablepick@lemmy.cablepick.net
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          curl localhost:8536/api/v3/site now works!

          Nice! Sorry my notes are a mess and nothing is in order since I was trying a lot of different things at the time.

        • cablepick@lemmy.cablepick.net
          link
          fedilink
          arrow-up
          2
          ·
          2 years ago

          Lemmy logs everything, and I mean everything. I haven’t found a setting to dial it back so I’ve banned it from writing to syslog and moved journal to memory only. Here is what I ran to stop it from filling up my disk with logs.

          echo 'if $programname == "lemmy_server" then stop' >> /etc/rsyslog.d/ignore-lemmy_server.conf
          systemctl restart rsyslog

          sed -i 's/#SystemMaxUse=/SystemMaxUse=25M/g' /etc/systemd/journald.conf
          sed -i 's/#Storage=auto/Storage=volatile/g' /etc/systemd/journald.conf systemctl restart systemd-journald