saas icon indicating copy to clipboard operation
saas copied to clipboard

What could cause the app to be so laggy?

Open OB42 opened this issue 1 year ago • 1 comments

Hi, I wanted to try out the project, set up everything, the only change I made was reactivating regular passwordless mail login. I use a M1 macbook pro, the atlas mongodb is M0(the free version, should I get a paid one?) I have multiple seconds of loading on every single page. Is that normal?it's so sluggish for what it actually does Any advice would be appreciated, Thanks

OB42 avatar Jul 02 '23 17:07 OB42

@OB42 Try local database instead of remote.


Once you install mongod and mongosh locally, here are some commands you may find useful:

sudo mongod --auth --port 27017 --dbpath /var/lib/mongodb

Create user and grant permission:

use admin
db.createUser(
  {
    user: "myUserAdmin",
    pwd: "123XXXXXXXXXXX",
    roles: [
	{ role: "root", db: "admin" },
	{ role: "userAdminAnyDatabase", db: "admin" },
	{ role: "readWriteAnyDatabase", db: "admin" }
    ]
  }
)
db.grantRolesToUser("myUserAdmin", ["root"]);
sudo mongosh --port 27017  --authenticationDatabase "admin" -u "myUserAdmin" -p

Connection string for MongoDB Compass and env var:

mongodb://myUserAdmin:123XXXXXXXXXXX@localhost:27017/?authSource=admin&readPreference=primary&ssl=false

Let me know how it goes.

tima101 avatar Jul 10 '23 20:07 tima101