#[Discord bot] mongodb error code=1
7 messages · Page 1 of 1 (latest)
Apparently this was the solution:
root@vps178028:~# mkdir /var/run/mongodb
root@vps178028:~# chown mongodb:mongodb /var/run/mongodb
root@vps178028:~# view /var/log/mongodb/mongod.log
root@vps178028:~# service mongod restart
root@vps178028:~# service mongod status
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2022-10-12 14:01:17 CDT; 3s ago
I guess I'll update my statbot service file to only start if mongod is running:
[Unit]
Description=Lichess Discord
After=mongod.target network.target remote-fs.target nss-lookup.target
[Service]
Restart=always
RestartSec=30
WorkingDirectory=/home/lichess/lichess-discord
ExecStart=/usr/bin/npm start
[Install]
WantedBy=default.target
Yeah I never liked db to store discord related data, in past I had users request a lot of data stored info for my other bot, but I guess it does provide easy convenience
PostgreSql is my choice
Ah... right, I forgot probably most of my commands could be made fault-tolerant as I'm storing minimal information (username and rating category preference).
Yeah with my previous bot I used to store string quotes in a db and it just took too long to pull out data and people hated that, also didn’t suit well with recent jda update like 3 to 4 months ago. So I changed to temporarily cache storage. Since it was fast people liked it more