• I got mongodb installed. I had no issues with it, except when my server restarts, it won't start... but I know why, I have an NFS share to another (smaller, but bigger storage) server for storage and it tries to start without the mount... something for me to look into.

    But other than that, I had no issue, where mongodb would stop randomly.

  • GNU/Linux Admin

    @Adam-Poniatowski You may need a file /etc/systemd/system/mongod.service

          Description=High-performance, schema-free document-oriented database
          ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf

    For Ubuntu 16.10... as Ubuntu no longer uses Upstart 😢

  • @julian Thanks for that 🙂 I use centos 7 though, but luckily they both use systemd, so that is fine with me.

    I will try this out, hopefully it won't do the same thing as what it currently does... fails to start, because the nfs share is not mounted yet lol

    Do you think I might need this:

    RequiresMountsFor=/path/to/mount/ ? just in case... and my nodebb.service I just add: Requires=mongod.service ... or will this not automatically start?

  • @Adam-Poniatowski
    Try systemctl enable mongod if you use Centos7.
    It will link some scripts to the upstart dir.

  • @xidui I mainly use systemctl 🙂 because mongodb has a systemvinit script, it generates one (mongod.service), which I have to disable and enable again (with the new mongod.service file) to make the symlink files and I can start it. the problem is, it starts up before my nfs mount...

  • Is there any way to convert a MongoDB database to Redis? Maybe that could fix it for @xidui.

  • Plugin & Theme Dev

    @Jop-V. MongoDB is a better option than Redis due to the high memory requirements of Redis. Most communities I know use mongo including this community.

    Any case you want to convert, NodeBB core team can get it done for you for a price. Contact sales@nodebb.org

  • @pichalite
    Thanks for the information. Do you have some idea on how those team deal with the issue that mongodb may down every several days? Mongodb Cluster or something else?
    As I see it, mongodb cluster is too heavy for such an deployment with NodeBB.

    Thank you 🙂

  • Plugin & Theme Dev

    @xidui they don't deal with it coz they don't have that issue. Check mongo logs if there is anything there.

  • @xidui just a friendly offer here. Maybe you want someone to host your Mongo database (PM me). Otherwise I suggest to scale horizontatally. Meaning to have a seperate machine for all your tasks.

    @pichalite the only reason to use MongoDB is a financial one. Meaning that you cannot afford more RAM. However, considering you want to achieve the best UX you want to target the greatest speed possible. Therefore Redis should always be your first choice. Especially as it could be replaced by SSDB for example. A drop in replacement for Redis.

  • @AOKP
    Thank you for your offer. After the change in this issue, my mongo db has not went down until now. It seems to be more stable.

Suggested Topics

| |